
Jan. 31, 2017
7:08 p.m.
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