Extending Python Syntax with @
python at rcn.com
Thu Mar 11 23:15:57 CET 2004
> print @(separator = None) x, y, z
For this particular example, you might get farther by proposing a
builtin print function that takes optional keyword arguments:
def newprint(*args, separator=' ', destination=sys.stdout):
print >> destination, separator.join(args)
Guido at one time wished that print was a function instead of a
statement. Here's your chance to push that idea forward.
Using a function instead of a statement is inherently more flexible,
easier to extend, and helps address a couple of micro-warts (i.e. a
handful of people hate the automatic spacing, and more than a handful
hate the >> notation).
More information about the Python-list