gratuitous new features in 2.0

Pete Shinners pshinners at mediaone.net
Sun Aug 27 14:18:17 EDT 2000


"Guido van Rossum" <guido at beopen.com> wrote
> Because it is so much more general and powerful!  The teePrint
> solution can easily be adapted to work with the extended print
> statement:
>
>   def teePrint(files, *stuff):
>       for file in files:
>           for item in *stuff:
>               print item,
>           print

am i missing something, or should this code have read...

   def teePrint(files, *stuff):
       for file in files:
           for item in *stuff:
               print >> file, item,
           print >> file,

i get confused the the BDFL makes programming errata.
anyways, i've been into python since the beginning of the
year, and i'm pleased to see the new features arriving in
python (bah, your cries of newbie excited by shiny things
fall on deaf ears :] )

btw, that last line looks a little "new" (shall we say?)
would that be the proper syntax for printing a newline with
the extended print syntax?








More information about the Python-list mailing list