mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
PEP 3114: rename .next() to .__next__() and add next() builtin.
This commit is contained in:
parent
4d2adcca52
commit
a18af4e7a2
83 changed files with 495 additions and 425 deletions
|
@ -7,7 +7,7 @@ import sys
|
|||
# Iterators in Python aren't a matter of type but of protocol. A large
|
||||
# and changing number of builtin types implement *some* flavor of
|
||||
# iterator. Don't check the type! Use hasattr to check for both
|
||||
# "__iter__" and "next" attributes instead.
|
||||
# "__iter__" and "__next__" attributes instead.
|
||||
|
||||
NoneType = type(None)
|
||||
TypeType = type
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue