Re: New-style objects are not instances, apparently

2008-01-03 Thread Martin v. Löwis
> Further experimentation showed that derivation from object was the > culprit; new-style objects are not considered "instances" in the above > sense. I wasn't able to figure out a workaround. Is there one, or is > the distinction between traditional classes and built-in types only > going to get

Re: New-style objects are not instances, apparently

2008-01-03 Thread Arnaud Delobelle
On Jan 3, 9:15 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I have a class that derives from Exception.  In Python 2.4, > isinstance(MyClass(), types.InstanceType) was True.  In 2.5, it's > False. > > Further experimentation showed that derivation from object was the > culprit; new-style ob

Re: New-style objects are not instances, apparently

2008-01-03 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > Further experimentation showed that derivation from object was the > culprit; new-style objects are not considered "instances" in the above > sense. I wasn't able to figure out a workaround. Is there one, or is > the distinction between traditional classes and built-in

New-style objects are not instances, apparently

2008-01-03 Thread [EMAIL PROTECTED]
I have a class that derives from Exception. In Python 2.4, isinstance(MyClass(), types.InstanceType) was True. In 2.5, it's False. Further experimentation showed that derivation from object was the culprit; new-style objects are not considered "instances" in the above sense. I wasn't able to fi