On Fri, Sep 18, 2020 at 3:50 PM Paolo Lammens firstname.lastname@example.org wrote:
class Spam: def __add__(self, other): return self def __call__(self, f): return f @ Spam() + Spam() def func(): pass
I think so, yes.
That looks hella weird XD
Indeed it does, but you can do all kinds of other "weird" stuff with callables -/ they are objects like any other, and this can be the result of virtually any expression.
Python-ideas mailing list -- email@example.com
To unsubscribe send an email to firstname.lastname@example.org
Message archived at https://email@example.com/message/UVFUGO...
Code of Conduct: http://python.org/psf/codeofconduct/