[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
More information about the Python-Dev mailing list
Sun Feb 17 20:42:09 CET 2008
- Previous message: [Python-Dev] Use Python 3.0 syntax for except and raise?
- Next message: [Python-Dev] Use Python 3.0 syntax for except and raise?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
[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
- Previous message: [Python-Dev] Use Python 3.0 syntax for except and raise?
- Next message: [Python-Dev] Use Python 3.0 syntax for except and raise?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list