On 2017-01-31 10:57 AM, Joao S. O. Bueno wrote:
BUT - no, it is_not_  an easy decorator to craft - and I don't think
it can be made to work
cleanly without depending on implementation details of cPython.

Pure Python version is certainly possible with descriptor protocol.

PoC: https://gist.github.com/1st1/ebee935256c7cc35c38cc3f73f00461d

-1 on having a built-in like this.

Yury
_______________________________________________
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to