fixed a bug related to string literal tokens with = in them

This commit is contained in:
David Halter
2012-10-07 22:05:03 +02:00
parent db315f44f4
commit 8e9047158e
2 changed files with 6 additions and 1 deletions

View File

@@ -709,7 +709,7 @@ class Statement(Simple):
raise raise
else: else:
if tok in ['return', 'yield'] or level == 0 and \ if tok in ['return', 'yield'] or level == 0 and \
'=' in tok and not tok in ['>=', '<=', '==', '!=']: tok.endswith('=') and not tok in ['>=', '<=', '==', '!=']:
# This means, there is an assignment here. # This means, there is an assignment here.
# Add assignments, which can be more than one # Add assignments, which can be more than one

View File

@@ -20,6 +20,11 @@ float.is_int
#? ['upper'] #? ['upper']
r"".upper r"".upper
# strangely this didn't work, because the = is used for assignments
#? ['upper']
"=".upper
# ----------------- # -----------------
# lists # lists
# ----------------- # -----------------