diff options
Diffstat (limited to 'tests/bytecode/mp-tests/locals1.py')
-rw-r--r-- | tests/bytecode/mp-tests/locals1.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/bytecode/mp-tests/locals1.py b/tests/bytecode/mp-tests/locals1.py new file mode 100644 index 0000000000..49c34da1ad --- /dev/null +++ b/tests/bytecode/mp-tests/locals1.py @@ -0,0 +1,22 @@ +# to test the order of locals and arguments (LOAD_FAST, STORE_FAST) + +def f1(): + b = 1 + a = 2 + return a + b + +def f2(b): + a = 2 + return a + b + +def f3(): + def f3f(): + return True + a = 1 + return f3f(a) + +def f4(): + x = 1 + def f3f(): + return True + return f3f(x) |