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/2008-February/076935.html below:

[Python-Dev] Use Python 3.0 syntax for except and raise?

[Python-Dev] Use Python 3.0 syntax for except and raise? [Python-Dev] Use Python 3.0 syntax for except and raise?Raymond Hettinger python at rcn.com
Sun Feb 17 20:42:09 CET 2008
[Christian Heimes]
> I like to run the 2to3 tool with raise and except fixers over the 2.6
> sources. The raise fixer changes "raise Exception, msg" to "raise
> Exception(msg)" and the except fixer replaces "except Exception, err" by
> "except Exception as err".

+1  The new syntax so much better that we should do this even if 3.0 did not exist.

There are some modules like Decimal that make a promise to run on earlier
versions of Python.  In those cases only the first change (backwards compatible)
should be made.  Our 5,000 line Decimal package will need to wait for 3.0 to
use the except/as form :-(

Raymond
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