[Python-ideas] A decorator to call super()

Nick Coghlan ncoghlan at gmail.com
Wed Feb 1 15:47:58 EST 2017


On 31 January 2017 at 21:55, Joao S. O. Bueno <jsbueno at python.org.br> wrote:
> Sure - thanks  - I did not even consider the descriptor mechanism, as
> I got focused in getting the equivalent from  the __class__ cell
> inside the decorator code.
>
> And of course, now there is the "__init_subclass__" mechanism - a
> mixin version using that was as straight forward as it can be as well.

Folks that are interested in these kinds of ideas may also want to
take a look at Fraser Tweedale's "Elk" project and see what would be
involved in porting the "method modifiers" feature to Python 3:
https://frasertweedale.github.io/elk/modifiers.html

Cheers,
Nick.

P.S. I don't know of anyone actually using Elk in production, but it's
a good project to explore for anyone interested in more structured
approaches to managing method overrides

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Python-ideas mailing list