Isolate pseudo op IMPORT_NAME_CONT

I think this is a holdover from pre 2.3 days. Possibly it can be dropped altogether.
This commit is contained in:
rocky
2016-07-14 20:02:47 -04:00
parent c9d1f72424
commit 0ee52aeeef
5 changed files with 13 additions and 14 deletions

View File

@@ -159,7 +159,9 @@ class Scanner26(scan.Scanner2):
imports = self.all_instr(0, codelen,
(self.opc.IMPORT_NAME, self.opc.IMPORT_FROM,
self.opc.IMPORT_STAR))
if len(imports) > 1:
# Changes IMPORT_NAME to IMPORT_NAME_CONT.
# Possibly a Python 2.0 hangover
if len(imports) > 1 and self.version < 2.3:
last_import = imports[0]
for i in imports[1:]:
if self.lines[last_import].next > i: