[Python-3000] Problem with grammar for 'except'?

Brett Cannon brett at python.org
Thu Sep 4 06:10:33 CEST 2008


I gave a talk last night at the Vancouver Python users group on
2.6/3.0, and I tried the following code and it failed during a live
demo::

  >>> try: pass
  ... except Exception, Exception: pass
    File "<stdin>", line 2
      except Exception, Exception: pass
                                 ^
  SyntaxError: invalid syntax

Now from what I can tell from PEP 3110, that should be legal in 3.0.
Am I reading the PEP correctly?

-Brett


More information about the Python-3000 mailing list