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
___
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
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
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
>
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