[docs] [issue34118] Fix some class entries in 'Built-in Functions'
report at bugs.python.org
Mon Jul 16 06:41:34 EDT 2018
Raymond Hettinger <raymond.hettinger at 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 <report at bugs.python.org>
More information about the docs