diff options
author | Benjamin Peterson <benjamin@python.org> | 2008-05-26 00:54:22 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2008-05-26 00:54:22 (GMT) |
commit | f9ef9881d778fc5a5889ac36d77b204eab4d7b4e (patch) | |
tree | 112e7bde302cf1b3eb7ff057d201d88e5a67f8b0 /Doc/tutorial/controlflow.rst | |
parent | c15205e93957b3bef18f317a480f8b99213d4870 (diff) | |
download | cpython-f9ef9881d778fc5a5889ac36d77b204eab4d7b4e.zip cpython-f9ef9881d778fc5a5889ac36d77b204eab4d7b4e.tar.gz cpython-f9ef9881d778fc5a5889ac36d77b204eab4d7b4e.tar.bz2 |
update the tutorial to use str.format
Diffstat (limited to 'Doc/tutorial/controlflow.rst')
-rw-r--r-- | Doc/tutorial/controlflow.rst | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/tutorial/controlflow.rst b/Doc/tutorial/controlflow.rst index 4b4c819..9b68e57 100644 --- a/Doc/tutorial/controlflow.rst +++ b/Doc/tutorial/controlflow.rst @@ -445,8 +445,8 @@ called with an arbitrary number of arguments. These arguments will be wrapped up in a tuple. Before the variable number of arguments, zero or more normal arguments may occur. :: - def fprintf(file, format, *args): - file.write(format % args) + def fprintf(file, template, *args): + file.write(template.format(args)) .. _tut-unpacking-arguments: |