You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-02 16:44:46 +08:00
11 lines
428 B
Python
11 lines
428 B
Python
# Adapted from Python 3.6 trace.py
|
|
# Bug was in handling BUILD_TUPLE_UNPACK created via
|
|
# *opts.arguments
|
|
import argparse
|
|
parser = argparse.ArgumentParser()
|
|
parser.add_argument('filename', nargs='?')
|
|
parser.add_argument('arguments', nargs=argparse.REMAINDER)
|
|
opts = parser.parse_args(["foo", "a", "b"])
|
|
argv = opts.filename, *opts.arguments
|
|
assert argv == ('foo', 'a', 'b'), "Reconstruct tuple using '*' and BUILD_TUPLE_UNPACK"
|