[Python-bugs-list] [ python-Bugs-522274 ] compiler/transformer.py STARSTAR doesn't exist
noreply@sourceforge.net
noreply@sourceforge.net
Sat, 16 Mar 2002 11:21:57 -0800
Bugs item #522274, was opened at 2002-02-24 20:40
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=522274&group_id=5470
Category: Parser/Compiler
Group: Python 2.2
Status: Open
Resolution: None
Priority: 5
Submitted By: Evelyn Mitchell (efm)
>Assigned to: Jeremy Hylton (jhylton)
>Summary: compiler/transformer.py STARSTAR doesn't exist
Initial Comment:
pyChecker complains at line 774 of tokenizer.py
No module attribute (STARSTAR) found
The section is:
if i < len(nodelist):
# should be DOUBLESTAR or STAR STAR
t = nodelist[i][0]
if t == token.DOUBLESTAR:
node = nodelist[i+1]
elif t == token.STARSTAR:
node = nodelist[i+2]
else:
raise ValueError, "unexpected
token: %s" % t
names.append(node[1])
flags = flags | CO_VARKEYWORDS
I've verified that there is no STARSTAR in token.py.
I'd patch this to be token.STAR, which does exist, but
this module has no self tests or unit tests, so I
wouldn't be able to know if it broke anything.
My wild guess is that the intention is to refer to two
STAR tokens rather than a DOUBLESTAR token (and that is
because the increment is 2 rather than 1), but I think
that evidence is pretty slim.
----------------------------------------------------------------------
>Comment By: Guido van Rossum (gvanrossum)
Date: 2002-03-16 14:21
Message:
Logged In: YES
user_id=6380
I think the STARSTAR should be STAR. Jeremy, can you
confirm & fix? Also, there needs to be a unittest for this
code, apparently!
----------------------------------------------------------------------
Comment By: Evelyn Mitchell (efm)
Date: 2002-03-16 11:18
Message:
Logged In: YES
user_id=13263
Sorry, too much caffine.
The file is compiler/transformer.py
----------------------------------------------------------------------
Comment By: Just van Rossum (jvr)
Date: 2002-03-10 13:48
Message:
Logged In: YES
user_id=92689
I don't see a file "tokenizer.py" in the repository, only
"tokenize.py", which only has 262 lines. What is this
bug about?
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=522274&group_id=5470