forked from VimPlug/jedi
@@ -509,3 +509,20 @@ Config.mode
|
||||
|
||||
#? int()
|
||||
Config.mode2
|
||||
|
||||
|
||||
# -----------------
|
||||
# Nested class/def/class
|
||||
# -----------------
|
||||
class Foo(object):
|
||||
a = 3
|
||||
def create_class(self):
|
||||
class X():
|
||||
a = self.a
|
||||
self.b = 3.0
|
||||
return X
|
||||
|
||||
#? int()
|
||||
Foo().create_class().a
|
||||
#? float()
|
||||
Foo().b
|
||||
|
||||
@@ -65,6 +65,8 @@ class C():
|
||||
def with_param(self):
|
||||
return lambda x: x + self.a()
|
||||
|
||||
lambd = lambda self: self.foo
|
||||
|
||||
#? int()
|
||||
C().a()
|
||||
|
||||
@@ -75,6 +77,11 @@ index = C().with_param()(1)
|
||||
#? float()
|
||||
['', 1, 1.0][index]
|
||||
|
||||
#? float()
|
||||
C().lambd()
|
||||
#? int()
|
||||
C(1).lambd()
|
||||
|
||||
|
||||
def xy(param):
|
||||
def ret(a, b):
|
||||
|
||||
Reference in New Issue
Block a user