Title: 2to3 except fixer does the wrong thing for certain raise statements
Type: behavior Stage:
Components: 2to3 (2.x to 3.x conversion tool) Versions: Python 3.1, Python 2.7, Python 2.6
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, brodie
Priority: normal Keywords:

Created on 2010-08-22 18:51 by brodie, last changed 2010-08-22 23:51 by benjamin.peterson. This issue is now closed.

Messages (2)
msg114694 - (view) Author: Brodie Rao (brodie) Date: 2010-08-22 18:51
Given the following statements:

    raise Foo('bar'), None, baz
    raise Foo('bar'), None

2to3 produces:

    raise Foo('bar')(None).with_traceback(baz)
    raise Foo('bar')(None)

Instead of:

    raise Foo('bar').with_traceback(baz)
    raise Foo('bar')
msg114717 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2010-08-22 23:51
r84276. I didn't "fix" the second case "raise e, None" since that syntax is quite pointless.
Date User Action Args
2010-08-22 23:51:48benjamin.petersonsetstatus: open -> closed

nosy: + benjamin.peterson
messages: + msg114717

resolution: fixed
2010-08-22 18:51:17brodiecreate