Consider these functions:
def f():
print("WTF?!")
def g():
print("WTF?!")
They both do exactly the same thing, but a test of f == g
still gives False
. Do I assume from this that functor equality is evaluated by reference, and that there is no difference between is
and ==
?
Whether or not that is the case, which one is better to use (even if only stylistically)?
By the way I'm primarily interested in Python 3 (Python 3.6).
EDIT
This question is not a duplicate, I think. I understand the difference between reference equality and value equality, I just want to understand how ==
uses value equality (if at all) on functors.