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/076934.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?Georg Brandl g.brandl at gmx.net
Sun Feb 17 19:17:19 CET 2008
Christian Heimes schrieb:
> Good evening everybody!
> 
> 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". In my humble opinion the Python stdlib should
> give proper examples how write good code.
> 
> During the migration period from the 2.x series to 3.x we have two
> obvious ways to write code. Let's stick to the new and preferred way.
> 
> Oh and please use the new syntax for patches, too. It makes my job with
> svnmerge a little bit easier.

You'd have to exempt modules mentioned in PEP 291 though.

Georg

-- 
Thus spake the Lord: Thou shalt indent with four spaces. No more, no less.
Four shall be the number of spaces thou shalt indent, and the number of thy
indenting shall be four. Eight shalt thou not indent, nor either indent thou
two, excepting that thou then proceed to four. Tabs are right out.

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