Raymond Hettinger wrote:

If an external non-cooperative class needs to be used, then
it should be wrapped in a class that makes an explicit
__init__ call to the external class and then calls super().__init__()
to continue the forwarding.

I don't think it's as simple as that. Isn't that super() call
going to call the __init__() method that you just explicitly
called *again*?

Seems like you would at least need to use super(BaseClass)...
to skip the one you just called. But it's not immediately
obvious to me that this won't ever skip other classes that
you *do* want to call.

--
Greg
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to