mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-16 10:37:52 +08:00
Added a closure test that would have failed before the names_dict refactoring.
This commit is contained in:
@@ -89,6 +89,22 @@ def f(b, a): return a
|
|||||||
#? []
|
#? []
|
||||||
f(b=3)
|
f(b=3)
|
||||||
|
|
||||||
|
# -----------------
|
||||||
|
# closure
|
||||||
|
# -----------------
|
||||||
|
|
||||||
|
def x():
|
||||||
|
a = 0
|
||||||
|
|
||||||
|
def x():
|
||||||
|
return a
|
||||||
|
|
||||||
|
a = 3.0
|
||||||
|
return x()
|
||||||
|
|
||||||
|
#? float()
|
||||||
|
x()
|
||||||
|
|
||||||
# -----------------
|
# -----------------
|
||||||
# class
|
# class
|
||||||
# -----------------
|
# -----------------
|
||||||
|
|||||||
Reference in New Issue
Block a user