When to derive from object?

Terry Reedy tjreedy at udel.edu
Tue Oct 13 15:28:34 EDT 2009


Paul Rudin wrote:
> Benjamin Kaplan <benjamin.kaplan at case.edu> writes:
> 
>> It's redundant. Python 3 cleaned up a lot of the warts that appeared
>> in Python over the years. Old-style classes (classes that didn't
>> inherit from object) were one of them. Every class in Python 3 is
>> derived from object whether you specify it or not.
> 
> ... it could be argued that having two ways to specify the same thing
> (derivation from object explictly or implicitly) is a wart in itself :/

Every function with default arguments can be called two or more ways.
Every function that returns None can be written two or more ways.
;-)




More information about the Python-list mailing list