class C: vs class C(object):

Bruno Desthuilliers bruno.42.desthuilliers at wtf.websiteburo.oops.com
Thu Jul 19 03:40:24 EDT 2007


nvictor a écrit :
> Hi,
> 
> I'm not an experienced developer, and I came across this statement by
> reading a code. I search for explanation, but can't find anything
> meaningful. I read the entire document written by python's creator
> about the features of version 2.2 The one named unifying types and
> classes. But This document only blew my head away.
 >
> I ended here and think somebody can explain me more about this. 

To make a long story short: Python 2.2 introduced a new object model 
which is more coherent and more powerful than the original one. The old 
one was kept so far for compatibility reasons, but there's absolutely no 
reason to use it no more since "new-style" classes can do anything 
"Classic" classes did and much more. IOW, don't even bother with 
old-style classes.



More information about the Python-list mailing list