forked from VimPlug/jedi
class decorators with __call__ are now properly working
This commit is contained in:
@@ -183,9 +183,27 @@ class B():
|
||||
def r(self):
|
||||
return 1
|
||||
|
||||
@r.setter
|
||||
def r(self, value):
|
||||
pass
|
||||
#@r.setter
|
||||
#def r(self, value):
|
||||
# pass
|
||||
|
||||
#? []
|
||||
B().r.
|
||||
#? []
|
||||
B().r()
|
||||
|
||||
class Decorator(object):
|
||||
def __init__(self, func):
|
||||
self.func = func
|
||||
|
||||
def __call__(self, *args, **kwargs):
|
||||
return self.func(1, *args, **kwargs)
|
||||
|
||||
@Decorator
|
||||
def nothing(a,b,c):
|
||||
return a,b,c
|
||||
|
||||
#? int()
|
||||
nothing("")[0]
|
||||
#? str()
|
||||
nothing("")[1]
|
||||
|
||||
Reference in New Issue
Block a user