Question on difference between LambdaType and FunctionType

Iwo Herka iwoherka at gmail.com
Sun Nov 25 15:54:54 EST 2018


> class Foo:
> def setup(self): ...
> __init__ = lambda self: self.setup()

Sorry, didn't address this. This is fine too, since I'm assuming that
only methods named __init__ are allowed to mutate the object.
Because 'setup' is not '__init__' it's disqualified.
Sincerely,
Iwo Herka


More information about the Python-list mailing list

AltStyle によって変換されたページ (->オリジナル) /