[Tutor] new class vs. old class [was using class methods (security)]

Jeff Shannon jeff@ccvcorp.com
Fri, 26 Apr 2002 14:45:11 -0700


Paul Tremblay wrote:

> In other words, when python 3.0 rolls around, I won't be able to
> write this code:
>
> class MyClass:
>         pass

That's not correct, as I understand it.  In Python 3.0 (or whenever), the above code will create a new-style class, and will
be functionally equivalent to the same definition subclassed from object.  It's only during the transitional period that
subclassing from object is required for new-style classes, and the only reason for that requirement is so that the parser can
differentiate new-style classes from old-style.

Jeff Shannon
Technician/Programmer
Credit International