[Python-Dev] syntax misfeature (exception) (original) (raw)
Neal Becker ndbecker2 at gmail.com
Sat Jan 20 16:36:48 CET 2007
- Previous message: [Python-Dev] syntax misfeature (exception)
- Next message: [Python-Dev] syntax misfeature (exception)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Georg Brandl wrote:
Neal Becker schrieb:
I accidentally wrote:
try: ... except a,b: rather than: try ... except (a,b): It appears that the 1st example syntax is silently accepted, but doesn't seem to work. Is this true? If so, I'd say it's a wart. Both have a meaning: The first assigns the exception object to b, while the second catches exception types a and b. BTW, in Python 3.0, the first will be spelled "except a as b". Please post questions about using the language to the comp.lang.python group. It's not a question, it's a critique. I believe this is a misfeature since it's so easy to make this mistake.
- Previous message: [Python-Dev] syntax misfeature (exception)
- Next message: [Python-Dev] syntax misfeature (exception)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]