mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Convert a lot of print statements to print functions in docstrings,
documentation, and unused/rarely used functions.
This commit is contained in:
parent
8321f97891
commit
752abd0d3c
20 changed files with 53 additions and 50 deletions
|
@ -222,10 +222,10 @@ These two statements are equivalent::
|
|||
|
||||
|
||||
for i in iter(obj):
|
||||
print i
|
||||
print(i)
|
||||
|
||||
for i in obj:
|
||||
print i
|
||||
print(i)
|
||||
|
||||
Iterators can be materialized as lists or tuples by using the :func:`list` or
|
||||
:func:`tuple` constructor functions:
|
||||
|
@ -709,7 +709,7 @@ obvious :keyword:`for` loop::
|
|||
containing the count and each element. ::
|
||||
|
||||
>>> for item in enumerate(['subject', 'verb', 'object']):
|
||||
... print item
|
||||
... print(item)
|
||||
(0, 'subject')
|
||||
(1, 'verb')
|
||||
(2, 'object')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue