Re: [Python-Dev] Python 3, new-style classes and __class__

2011-11-20 Thread Guido van Rossum
On Sun, Nov 20, 2011 at 10:44 AM, Michael Foord wrote: > > On 20 Nov 2011, at 16:35, Guido van Rossum wrote: > >> Um, what?! __class__ *already* has a special meaning. Those examples >> violate that meaning. No wonder they get garbage results. >> >> The correct way to override isinstance is explai

Re: [Python-Dev] Python 3, new-style classes and __class__

2011-11-20 Thread Michael Foord
On 20 Nov 2011, at 16:35, Guido van Rossum wrote: > Um, what?! __class__ *already* has a special meaning. Those examples > violate that meaning. No wonder they get garbage results. > > The correct way to override isinstance is explained here: > http://www.python.org/dev/peps/pep-3119/#overloadin

Re: [Python-Dev] Python 3, new-style classes and __class__

2011-11-20 Thread Guido van Rossum
Um, what?! __class__ *already* has a special meaning. Those examples violate that meaning. No wonder they get garbage results. The correct way to override isinstance is explained here: http://www.python.org/dev/peps/pep-3119/#overloading-isinstance-and-issubclass . --Guido On Sat, Nov 19, 2011 a

Re: [Python-Dev] Python 3, new-style classes and __class__

2011-11-20 Thread Vinay Sajip
Michael Foord voidspace.org.uk> writes: > The Python compiler can do strange things with assignment to __class__ in the > presence of super. This issue has now been fixed, but it may be what is > biting you: > > http://bugs.python.org/issue12370 > > If this *is* the problem, then see the workarou