No unicode in Python3.

but we need it in Python2. The bug was probably introduced
as a result of recent Python code type unteroperability canonicalization
This commit is contained in:
rocky
2017-09-26 09:43:01 -04:00
parent 114f979555
commit f73f0ba41c

View File

@@ -20,6 +20,7 @@ from __future__ import print_function
from uncompyle6.parser import PythonParser, PythonParserSingle, nop_func
from uncompyle6.parsers.astnode import AST
from spark_parser import DEFAULT_DEBUG as PARSER_DEFAULT_DEBUG
from xdis import PYTHON3
class Python3Parser(PythonParser):
@@ -890,7 +891,10 @@ class Python3Parser(PythonParser):
return not isinstance(tokens[first].attr, tuple)
elif lhs == 'kwarg':
arg = tokens[first].attr
return not (isinstance(arg, str) or isinstance(arg, unicode))
if PYTHON3:
return not isinstance(arg, str)
else:
return not (isinstance(arg, str) or isinstance(arg, unicode))
elif lhs == 'while1elsestmt':
# if SETUP_LOOP target spans the else part, then this is
# not while1else. Also do for whileTrue?