mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 14:04:26 +08:00
Test closure extraction
This commit is contained in:
@@ -127,3 +127,17 @@ class Ya():
|
||||
a = 3
|
||||
#? 11 text {'new_name': 'f'}
|
||||
c = f(a)
|
||||
# -------------------------------------------------- in-closure
|
||||
def x(z):
|
||||
def y(x):
|
||||
#? 15 text {'new_name': 'f'}
|
||||
return -x * z
|
||||
# ++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
def f(x, z):
|
||||
return -x * z
|
||||
|
||||
|
||||
def x(z):
|
||||
def y(x):
|
||||
#? 15 text {'new_name': 'f'}
|
||||
return f(x, z)
|
||||
|
||||
Reference in New Issue
Block a user