You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 01:09:52 +08:00
2.5/2.6 RETURN_VALUE bug
This commit is contained in:
BIN
test/bytecode_2.5/11_return_val.pyc
Normal file
BIN
test/bytecode_2.5/11_return_val.pyc
Normal file
Binary file not shown.
BIN
test/bytecode_2.6/11_return_val.pyc
Normal file
BIN
test/bytecode_2.6/11_return_val.pyc
Normal file
Binary file not shown.
13
test/simple_source/stmts/11_return_val.py
Normal file
13
test/simple_source/stmts/11_return_val.py
Normal file
@@ -0,0 +1,13 @@
|
||||
# 2.5.6 decimal.py
|
||||
# Bug on 2.5 and 2.6 by incorrectly changing opcode to
|
||||
# RETURN_VALUE to psuedo op: RETURN_END_IF
|
||||
def _formatparam(param, value=None, quote=True):
|
||||
if value is not None and len(value) > 0:
|
||||
if isinstance(value, tuple):
|
||||
value = 'a'
|
||||
if quote or param:
|
||||
pass
|
||||
else:
|
||||
return '%s=%s' % (param, value)
|
||||
else:
|
||||
return param
|
Reference in New Issue
Block a user