Re: why objects of old style classes are instances of 'object'

2008-04-21 Thread AlFire
Diez B. Roggisch wrote: But not everything is a newstyle-class: class Foo: pass ... isinstance(Foo, object) True isinstance(Foo, type) False class Bar(object): pass ... isinstance(Bar, type) True thx for explanation. but more I look at it less and

Re: why objects of old style classes are instances of 'object'

2008-04-21 Thread Gabriel Genellina
En Tue, 22 Apr 2008 00:49:27 -0300, AlFire [EMAIL PROTECTED] escribió: Diez B. Roggisch wrote: But not everything is a newstyle-class: class Foo: pass ... isinstance(Foo, object) True isinstance(Foo, type) False class Bar(object): pass ... isinstance(Bar, type) True thx

why objects of old style classes are instances of 'object'

2008-04-17 Thread AlFire
Hi, Q: from the subject, why objects of old style classes are instances of 'object'? class a():pass A=a() isinstance(A,object) True I would expect False Thx, Andy -- http://mail.python.org/mailman/listinfo/python-list

Re: why objects of old style classes are instances of 'object'

2008-04-17 Thread Diez B. Roggisch
AlFire wrote: Hi, Q: from the subject, why objects of old style classes are instances of 'object'? class a():pass A=a() isinstance(A,object) True Because everything is an object. But not everything is a newstyle-class: class Foo: pass ... isinstance(Foo, object) True