[Tutor] Subclassing object

Alan Gauld alan.gauld at btinternet.com
Mon Jan 18 02:17:36 CET 2010


"Robert" <webtourist at gmail.com> wrote

> I have been wondering about this "New-style Class" subject along this 
> line:
>
> so, *theoretically speaking*, in EXISTING, pre-P3K code,
> if one changes everywhere where it's coded "class someClass()" to
> "class someClass(object)",
> it should not break the programs, right ?

More correctly replacing old style

class SomeClass:

with new style

class SomeClass(object):

should not break anything.
You cannot of course reliably go the other way!

Alan G 




More information about the Tutor mailing list