Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:

> I propose that the 2nd 3 follow the model of the 1st 3,

This makes sense and would read a little better.

> Classes enumerate, filter, map, memoryview, range, reversed, 
> tuple, and zip are untagged.  I think, to be consistent, 
> that they should all get the *class* tag.

To me, that makes the most sense for: memoryview, range and tuple.

The rest are used like functions.  Even though they are technically classes, it 
is confusing to think of them as such (we don't call map() to get an instance 
of a mapobject and do a dir() to what interesting methods it may have).  Tools 
like map() and filter() actually were functions at one time.  The substantive 
change was that they were made to be lazy.  The implementation detail was that 
they were implemented as classes -- they could have been generators instead.  
Accordingly, I think tagging these as classes is pedantically correct but 
actually makes the docs a little less usable.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue34118>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to