mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +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
|
@ -139,7 +139,7 @@ def fill_stmt(iterable, fill_len):
|
|||
overflow = None
|
||||
while total_len < fill_len:
|
||||
try:
|
||||
new_item = it.next()
|
||||
new_item = next(it)
|
||||
buffer_.append(new_item)
|
||||
total_len += len(new_item) + 1
|
||||
except StopIteration:
|
||||
|
@ -188,7 +188,7 @@ def main(file_path):
|
|||
FILL - len(prefix) - len(indent))
|
||||
try:
|
||||
while True:
|
||||
print>>FILE, indent + prefix + stmt_iter.next()
|
||||
print>>FILE, indent + prefix + next(stmt_iter)
|
||||
except StopIteration:
|
||||
print>>FILE, ''
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue