Accessing parent objects

Antoon Pardon antoon.pardon at vub.be
Mon Mar 26 04:02:23 EDT 2018


On 25-03-18 00:54, Steven D'Aprano wrote:
>
> There's nothing wrong with super() in Python 2. You just have to 
> understand what you're doing. It's still the right solution for doing  
> inheritance the right way.
>
> ... 
>
> The trick is to use new-style classes that inherit from object, and avoid 
> the old-style classes that don't:
>
> # Good
> class Spam(object):
>     ...
>
> # Not so good
> class Spam:
>     ...

How good is that when almost all classes in the standard library are old style classes?

-- 
Antoon





More information about the Python-list mailing list