How about "print file=yonder, yo, de, do"
Jeff Petkau
jpet at eskimo.com
Sat Sep 2 15:39:41 EDT 2000
One more random stab at a different syntax, just
because this dead horse ain't been flogged enough.
How about this syntax:
print file=myfile, 1, 2, 3
Advantages:
- print remains a statement, which Guido has deemed important.
- no new keywords.
- no parser ambiguity, since assignment is not legal in an expression;
it parses just like an argument list.
- it looks exactly like keyword arguments in a function call, so
it fits in much nicer, and someone seeing it might (correctly!)
assume they can do the same thing in function calls.
- the concept is extensible to other keywords and other statements,
wheras >> will always be an out of place hack.
- it doesn't stand out visually. This may be a disadvantage for some.
But at least it doesn't look like C++.
--Jeff Petkau (jpet at eskimo.com)
More information about the Python-list
mailing list