[Python-ideas] New Python syntax for continuing definitions for existing classes
Ralph Broenink
ralph at ralphbroenink.net
Tue Sep 13 15:46:06 EDT 2016
Hi all,
On Tue, 13 Sep 2016 at 18:30 Chris Angelico <rosuav at gmail.com> wrote:
> Did you know that you can actually abuse decorators to do this with
> existing syntax? Check out this collection of evil uses of decorators:
>
> https://github.com/Rosuav/Decorators/blob/master/evil.py
>
There's also this post from Guido a few years back in python-dev, which
does something similar using metaclasses:
https://mail.python.org/pipermail/python-dev/2008-January/076194.html
I'm not sure it does exactly the same, but it is also an interesting
approach. (Although I like the decorator syntax more.) The discussion that
follows in that thread may also be of interest for this discussion.
Ralph
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20160913/1cc8227d/attachment.html>
More information about the Python-ideas
mailing list