Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:
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. ---------- assignee: docs@python -> rhettinger nosy: +rhettinger resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue45154> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com