]> granicus.if.org Git - python/commit
Fix com_arglist() and update grammar fragment.
authorJeremy Hylton <jeremy@alum.mit.edu>
Fri, 19 Apr 2002 22:56:37 +0000 (22:56 +0000)
committerJeremy Hylton <jeremy@alum.mit.edu>
Fri, 19 Apr 2002 22:56:37 +0000 (22:56 +0000)
commit8d22b0409b3d68edee104bc472334145337bebc7
treee801e41211a16f51d0fc21f7c75048ca60cac1b7
parent2ea2c9d1c3e74012f61e22246acdce3bfddef9d8
Fix com_arglist() and update grammar fragment.
SF bug #522264 reported by Evelyn Mitchell.

The code included a comment about "STAR STAR" which was translated
into the code as the bogus attribute token.STARSTAR.  This name never
caused an attribute error because it was never retrieved.  The code
was based on an old version of the grammar that specified kwargs as
two tokens ('*' '*').  I checked as far back as 2.1 and didn't find
this production.

The fix is simple, because token.DOUBLESTAR is the only token
allowed.  Also update the grammar fragment in com_arglist().

XXX I'll bet lots of other grammar fragments in comments are out of
date, probably in this module and in compile.c.
Lib/compiler/transformer.py