Michael Lohmann wrote:
I just wanted to override the
class-variable `magic_number` to give a reason why I don’t ever want to call
Magic.__init__ in Foo. If you want, you can have this class instead:

class Magic:
>     def __init__(self): raise RuntimeError("Do not initialize this
        class")
>
but I figured that this might look a bit artificial...

But your original example looks just as artificial. Skipping
the initialisation of a class you're inheriting from is an
extremely weird thing to do, and in any real-life situation
there's almost certainly a better design.

In any case, I don't see how this has anything to do with
invisible passing of **kwds.

In short, I don't understand what you're saying at all.

--
Greg
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to