2 ms·
They sure do--that's why we shouldn't have them. Instead: class Foo: def __init__(self): self.n = 0 def __call__(self): sel
by jzwinck 13y ago
They sure do--that's why we shouldn't have them. Instead:
class Foo:
def __init__(self):
self.n = 0
def __call__(self):
self.n += 1
return self.n
foo = Foo()