. Python 2.1 function attributes
Jeff Petkau
jpet at eskimo.com
Sun Jan 28 21:37:42 EST 2001
Jeff Petkau <jpet at eskimo.com> wrote in message
news:FFSc6.2506$iG3.539254 at dfiatx1-snr1.gtei.net...
> Barry A. Warsaw <barry at digicool.com> wrote in message
> news:mailman.980662113.14859.python-list at python.org...
> >
> > JD> Perhaps if "print >> file, something" were written as "print
> > JD> to file, something" there wouldn't be so much controversy over
> > JD> it, even though it wouldn't be doing more or less than it does
> > JD> today.
> >
> > We tried it. Using an identifier in that spot caused irreconcilable
> > syntactic ambiguities, so we had to pick a non-identifier. After
> > extensive market research <wink> `>>' was picked because it had the
>
> The following seems to work fine for 'print to', even if you insist
> on naming your variables 'to'.
>
> In Grammar/Grammar
> print_stmt: 'print' test [test] [',' test]+ [',']
>
> In compile.c:
> <some stuff>
Sorry, the evil genie of 1:30am postings got hold of my message.
That should have been,
print_stmt: 'print' [ test [test] [ ( ',' test)* [ ',' ] ] ]
--Jeff
More information about the Python-list
mailing list