Horrible abuse of __init_subclass__, or elegant hack?
Ethan Furman
ethan at stoneleaf.us
Wed Mar 31 19:23:51 EDT 2021
On 3/31/21 4:14 PM, Chris Angelico wrote:
> I think this code makes some sort of argument in the debate about
> whether Python has too much flexibility or if it's the best
> metaprogramming toolset in the world. I'm not sure which side of the
> debate it falls on, though.
Well, `__init_subclass__` is there to provide metaclass power without needing a full-blown metaclass.
I vote elegant hack. :)
--
~Ethan~
More information about the Python-list
mailing list