Closed caterinaurban closed 6 years ago
From @mostafa-abdullah on July 20, 2017 12:50
The current inference allows class methods to be called as normal calls with passing the first argument as the class instance.
For example, the current is allowed (which shouldn't be)
class A: def f(self): instance = A() return f(instance)
And accordingly, the following is not allowed (Which should be):
def f(): return 1 class A: def f(self): return f()
Because the inference confuses the function call f() with the method f(self)
f()
f(self)
Copied from original issue: caterinaurban/Lyra#42
From @mostafa-abdullah on July 20, 2017 12:50
The current inference allows class methods to be called as normal calls with passing the first argument as the class instance.
For example, the current is allowed (which shouldn't be)
And accordingly, the following is not allowed (Which should be):
Because the inference confuses the function call
f()
with the methodf(self)
Copied from original issue: caterinaurban/Lyra#42