typed_python
typed_python copied to clipboard
'is' fails inside a Class
class A(Class):
def f(self, other) -> bool:
return self is other
x = A()
print(x is x) # this gives True
print(x.f(x)) # this gives False
This is not going to work any time soon.
Sent from my iPhone
On Apr 8, 2020, at 12:02 PM, guslonergan [email protected] wrote:
class A(Class): def f(self, other) -> bool: return self is other
x = A() print(x is x) # this gives True print(x.f(x)) # this gives False — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.