Re: [Python-Dev] https://docs.python.org/3/using/index.html not linking correctly

2014-10-21 Thread MRAB
On 2014-10-21 01:39, Terry Reedy wrote: On 10/20/2014 7:29 PM, MRAB wrote: On 2014-10-21 00:09, Eli Bendersky wrote: On Mon, Oct 20, 2014 at 1:01 PM, Terry Reedy mailto:tjre...@udel.edu>> wrote: If I go to https://docs.python.org/3/using/index.html and click on any of the TOC entries

Re: [Python-Dev] isinstance() on old-style classes in Py 2.7

2014-10-21 Thread Barry Warsaw
On Oct 21, 2014, at 11:22 AM, Guido van Rossum wrote: >Hm. I've never been a fan of that. EIBTI and such... Yeah, I just hate seeing `class Foo(object)` in Python 3 and am too lazy to clean up every class definition. ;) YMMV! Cheers, -Barry signature.asc Description: PGP signature ___

Re: [Python-Dev] isinstance() on old-style classes in Py 2.7

2014-10-21 Thread Guido van Rossum
Hm. I've never been a fan of that. EIBTI and such... On Tue, Oct 21, 2014 at 10:53 AM, Barry Warsaw wrote: > On Oct 21, 2014, at 10:13 AM, Guido van Rossum wrote: > > >For new code, and whenever you have an opportunity to refactor old code, > >you should use new-style classes, by inheriting your

Re: [Python-Dev] isinstance() on old-style classes in Py 2.7

2014-10-21 Thread Barry Warsaw
On Oct 21, 2014, at 10:13 AM, Guido van Rossum wrote: >For new code, and whenever you have an opportunity to refactor old code, >you should use new-style classes, by inheriting your class from object (or >from another class that inherits from object). One nice way to do this module-globally is to

Re: [Python-Dev] isinstance() on old-style classes in Py 2.7

2014-10-21 Thread Mark Shannon
Hi, The problem is a side effect of the fact that old-style classes are implemented on top of new-style meta-classes. Consequently although C is the "class" of C() it is not its "type". >>> type(C()) >>> type(C()).__mro__ (, ) therefore >>> issubclass(type(C()), object) True which implies >

Re: [Python-Dev] isinstance() on old-style classes in Py 2.7

2014-10-21 Thread Guido van Rossum
This is one of the unfortunate effects of the existence of "old-style" classes in Python 2. The old-style class hierarchy is distinct from the new-style class hierarchy, but instances of old-style classes are still objects (since in Python, *everything* is an object). For new code, and whenever yo

[Python-Dev] PyPy3 2.4.0 released

2014-10-21 Thread Philip Jenvey
= PyPy3 2.4 - Snow White = We're pleased to announce PyPy3 2.4, which contains significant performance enhancements and bug fixes. You can download the PyPy3 2.4.0 release here: http://pypy.org/do

[Python-Dev] isinstance() on old-style classes in Py 2.7

2014-10-21 Thread Andreas Maier
Hi. Today, I ran across this, in Python 2.7.6: >>> class C: ... pass ... >>> issubclass(C,object) False >>> isinstance(C(),object) True <-- ??? The description of isinstance() in Python 2.7 does not reveal this result (to my reading). >From a duck-typing perspective, one would also not gues