[Python-Dev] one more thing for 2.2?
Thu, 12 Jul 2001 23:13:11 +0200
On Thu, Jul 12, 2001 at 05:02:30PM -0400, Guido van Rossum wrote:
> > has anyone looked at Paul Svensson's "unreserved words" patch?
> > http://mail.python.org/pipermail/python-list/2001-June/047996.html
> > "The bottom line: apply this patch, and you can use all of Python's
> > 'reserved words' as identifiers; in most cases right away, in all other
> > cases by wrapping parens around them."
> Wow, an impressive hack. But a hack! Lots of special casing, and
> breaks abstractions: the parser driver is supposed to know nothing
> about the actual grammar embodied in its tables.
But does it hurt if it does ? It's not like we use it as a general purpose
parser right now, and would we really want to use the current parser as a
general purpose one ? I have to agree that a nice, clean, powerful parser
that can deal better with ambiguities (an LR parser, is that what it's
called ? :P) is a much better solution, but in some cases, a hack is better
> And it won't help with yield: things like
> yield (1)
> yield 
> are as valid in the old syntax as they are with the yield statement
No, but it will help with bindings to languages that require keywords. .NET
comes to mind, again, as does Java. It would also be very cool if we could
rename pprint.pprint to pprint.print ;P
Thomas Wouters <firstname.lastname@example.org>
Hi! I'm a .signature virus! copy me into your .signature file to help me spread!