On Fri, Sep 18, 2020 at 3:50 PM Paolo Lammens <lammenspa...@gmail.com>
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.

-CHB




> _______________________________________________
>
>
> Python-ideas mailing list -- python-ideas@python.org
>
>
> To unsubscribe send an email to python-ideas-le...@python.org
>
>
> https://mail.python.org/mailman3/lists/python-ideas.python.org/
>
>
> Message archived at
> https://mail.python.org/archives/list/python-ideas@python.org/message/UVFUGOB5Q2PG44NFLYY2O5UEOFADSZA7/
>
>
> Code of Conduct: http://python.org/psf/codeofconduct/
>
>
>

-- 
Christopher Barker, PhD

Python Language Consulting
  - Teaching
  - Scientific Software Development
  - Desktop GUI and Web Development
  - wxPython, numpy, scipy, Cython


-- 
Christopher Barker, PhD

Python Language Consulting
  - Teaching
  - Scientific Software Development
  - Desktop GUI and Web Development
  - wxPython, numpy, scipy, Cython
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/T6EMDZQR7QZKLIURWRY3IXW6KMHMEVVY/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to