update tutorial function with more appropiate one from Eric Smith

This commit is contained in:
Benjamin Peterson 2008-05-28 01:12:35 +00:00
parent dbd2f6d8a9
commit a436878419
1 changed files with 2 additions and 2 deletions

View File

@ -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: