Why don't callable attributes of a class become methods?
Why don't callable attributes of a class become methods? Question: Consider the following snippet. import types def deff(s): print(f"deff called, {s=}") lam = lambda s: print(f"lam called, {s=}") class Clbl: def __call__(s): print(f"__call__ called, {s=}") clbl = Clbl() print(type(deff) == types.FunctionType) # True print(type(lam) == types.LambdaType) # True print(type(clbl) == Clbl) # True class A: …