[Python-Dev] class Foo(object) vs class Foo: should be clearly explained in python 2 and 3 doc
Barry Warsaw
barry at python.org
Sun Aug 10 18:26:39 CEST 2014
More information about the Python-Dev mailing list
Sun Aug 10 18:26:39 CEST 2014
- Previous message: [Python-Dev] class Foo(object) vs class Foo: should be clearly explained in python 2 and 3 doc
- Next message: [Python-Dev] class Foo(object) vs class Foo: should be clearly explained in python 2 and 3 doc
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Aug 10, 2014, at 11:51 AM, Alexander Belopolsky wrote: >This is not true. An alternative is to put > >__metaclass__ = type > >at the top of your module to make all classes in your module new-style in >python2. I like this much better, and it's what I do in my own bilingual code. It makes it much easier to remove the unnecessary cruft when you drop the Python 2 support. -Barry
- Previous message: [Python-Dev] class Foo(object) vs class Foo: should be clearly explained in python 2 and 3 doc
- Next message: [Python-Dev] class Foo(object) vs class Foo: should be clearly explained in python 2 and 3 doc
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list