A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2014-August/135718.html below:

[Python-Dev] class Foo(object) vs class Foo: should be clearly explained in python 2 and 3 doc

[Python-Dev] class Foo(object) vs class Foo: should be clearly explained in python 2 and 3 doc [Python-Dev] class Foo(object) vs class Foo: should be clearly explained in python 2 and 3 docSteven D'Aprano steve at pearwood.info
Sun Aug 10 19:21:46 CEST 2014
On Sun, Aug 10, 2014 at 11:51:51AM -0400, Alexander Belopolsky wrote:
> On Sat, Aug 9, 2014 at 8:44 PM, Steven D'Aprano <steve at pearwood.info> wrote:
> 
> > It is certainly required when writing code that will behave the same in
> > version 2 and 3
> >
> 
> 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.

So it is. I forgot about that, thank you for the correction.


-- 
Steven
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4