gratuitous new features in 2.0
Thomas Wouters
thomas at xs4all.net
Sun Aug 27 15:00:55 EDT 2000
On Sun, Aug 27, 2000 at 06:18:17PM +0000, Pete Shinners wrote:
> print >> file,
> 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?
Without the trailing comma, yes. With the trailing comma, no, that would be
invalid syntax. Exactly like it used to be without >>:
>>> print
>>> print ,
File "<stdin>", line 1
print ,
^
SyntaxError: invalid syntax
>>> print >> sys.stderr
>>> print >> sys.stderr,
File "<stdin>", line 1
print >> sys.stderr,
^
SyntaxError: invalid syntax
--
Thomas Wouters <thomas at xs4all.net>
Hi! I'm a .signature virus! copy me into your .signature file to help me spread!
More information about the Python-list
mailing list