Message401494
In pure python, generators are implemented as functions. In CPython, the only way to implement them is as a class. From a user's point of view, enumerate(), map(), zip(), and filter() are used like a functions (they doesn't have non-dunder methods). Accordingly, they don't have class markup in the docs even though technically they are classes. The docs are mostly consistent in this regard and have opted for the presentation that tends to be the most helpful to users. |
|
Date |
User |
Action |
Args |
2021-09-09 16:31:34 | rhettinger | set | recipients:
+ rhettinger, docs@python, Sanmitha Sadhishkumar |
2021-09-09 16:31:34 | rhettinger | set | messageid: <1631205094.18.0.81565394215.issue45154@roundup.psfhosted.org> |
2021-09-09 16:31:34 | rhettinger | link | issue45154 messages |
2021-09-09 16:31:34 | rhettinger | create | |
|