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/2010-January/097265.html below:

[Python-Dev] [RELEASED] Python 2.7 alpha 2

[Python-Dev] [RELEASED] Python 2.7 alpha 2Brett Cannon brett at python.org
Tue Jan 12 19:29:06 CET 2010
On Tue, Jan 12, 2010 at 04:29, Michael Foord <fuzzyman at voidspace.org.uk>wrote:

>  On 12/01/2010 12:16, Barry Warsaw wrote:
>
> On Jan 11, 2010, at 09:57 PM, Steven Bethard wrote:
>
>
>
>  Actually there's a solution to this one too:
>
>    FooBase = Meta('FooBase', (), {})
>    class Foo(FooBase):
>        ...
>
> That should work in Python 2.X and 3.X.
>
>
>  Ugly, but good call! :)
>
>
>
>
> There are all sorts of tricks. For example you can do exception handling
> that works with pre-2.6 syntax and 3.0 with a bare except and using
> sys.exc_info. It is horrible, but acceptable for short pieces of code (I
> have a couple of small modules that do this).
>
> I haven't yet tried converting larger code-bases to Python 3, but I think
> the workflow advocated by Martin is greatly preferable to the hacks and
> tricks needed to make the same codebase run under 2 & 3.
>
>
In other words we need to pull together a HOWTO for Python source like the
one for extension modules that Benjamin wrote and make it rather prominently
linked from the Python 3 documentation index page.

-Brett
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20100112/86cc3a21/attachment-0007.htm>
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