You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-02 16:44:46 +08:00
Less dishonest COME_FROMs
Addresses all of the problems seen in 3.7 datetime.py. However we limit COME_FROMs only to forward jumps, not back (which in the case of Python code right now means looping) jumps.
This commit is contained in:
@@ -811,7 +811,13 @@ class Scanner3(Scanner):
|
||||
self.fixed_jumps[offset] = fix or match[-1]
|
||||
return
|
||||
else:
|
||||
self.fixed_jumps[offset] = match[-1]
|
||||
if self.version < 3.6:
|
||||
# FIXME: this is putting in COME_FROMs in the wrong place.
|
||||
# Fix up grammar so we don't need to do this.
|
||||
# See cf_for_iter use in parser36.py
|
||||
self.fixed_jumps[offset] = match[-1]
|
||||
else:
|
||||
self.fixed_jumps[offset] = target
|
||||
return
|
||||
# op == POP_JUMP_IF_TRUE
|
||||
else:
|
||||
|
Reference in New Issue
Block a user