mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
update tutorial function with more appropiate one from Eric Smith
This commit is contained in:
parent
dbd2f6d8a9
commit
a436878419
1 changed files with 2 additions and 2 deletions
|
@ -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, template, *args):
|
||||
file.write(template.format(args))
|
||||
def write_multiple_items(file, seperator, *args):
|
||||
file.write(seperator.join(args))
|
||||
|
||||
|
||||
.. _tut-unpacking-arguments:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue