[issue36693] Reversing large ranges results in a minor type inconsistency
Raymond Hettinger
report at bugs.python.org
Mon Apr 22 00:58:42 EDT 2019
Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:
This all seems proper to me. In each case, an iterator is returned -- that is the documented behavior. The specific type of iterator is allowed to vary in ways that are convenient for the implementation.
Specifically, reversed() will call __reversed__() which must return an iterator but its type is allowed to vary. That is really convenient for handling extreme ranges separately from the fast, common case of smaller ranges.
----------
nosy: +rhettinger
resolution: -> not a bug
stage: -> resolved
status: open -> closed
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36693>
_______________________________________
More information about the Python-bugs-list
mailing list