Creating Classes

Steve Holden steve at holdenweb.com
Sun Dec 20 11:11:54 EST 2009


Dave Angel wrote:
[...]
> We were talking about 2.x   And I explicitly mentioned 3.x because if
> one develops code that depends on old-style classes, they'll be in
> trouble with 3.x, which has no way to specify old-style classes.  In
> 3.x, all classes are new-style.  And although it'll no longer matter
> whether you specify (object), it doesn't do any harm.  As I said, it's a
> good habit for a beginner to get into when defining classes.
> 
I maintain that this almost-cargo-cult belief over-complicates things
for language beginners. How long do you have to be using Python before
you make your first super() call? How many programs behave differently
with old-style vs. new-style classes?

regards
 Steve
-- 
Steve Holden           +1 571 484 6266   +1 800 494 3119
PyCon is coming! Atlanta, Feb 2010  http://us.pycon.org/
Holden Web LLC                 http://www.holdenweb.com/
UPCOMING EVENTS:        http://holdenweb.eventbrite.com/




More information about the Python-list mailing list