New style classes are classes inherited from class object. Therefore: class A: pass
is oldstyle, while class B(object): pass is newstyle. On Tue, Apr 29, 2008 at 8:29 AM, blaine <[EMAIL PROTECTED]> wrote: > On Apr 29, 5:32 am, Duncan Booth <[EMAIL PROTECTED]> wrote: > > =?ISO-8859-15?Q?=22Martin_v=2E_L=F6wis=22?= <[EMAIL PROTECTED]> wrote: > > > (FWIW, in 2.x, x>=4?, it's None < numbers < anything else; > > > numbers are ordered by value, everything else is ordered > > > by type name, then by address, unless comparison functions > > > are implemented). > > > > Quite apart from Jon pointing out that this isn't true for all cases > when > > copmparing against None, the other half also isn't true: > > > > >>> class C: pass > > >>> C() < 5 > > > > True > > > > That happens at least in Python 2.5.2 on win32. Yet another reason to > avoid > > old-style classes. > > Sorry - but what are new style classes? > -- > http://mail.python.org/mailman/listinfo/python-list > -- | _ | * | _ | | _ | _ | * | | * | * | * |
-- http://mail.python.org/mailman/listinfo/python-list