[issue23556] Scope for raise without argument is different in Python 2 and 3

2015-12-23 Thread John Mark Vandenberg
John Mark Vandenberg added the comment: In pyflakes we've looked at some of the strange scenarios where a raise without argument is 'legal'. A patch to report errors for some of these was rejected because they are legal. See https://github.com/pyflakes/pyflakes/pull/57 The worst example of '

[issue23556] Scope for raise without argument is different in Python 2 and 3

2015-07-29 Thread Martin Panter
Martin Panter added the comment: Here is a patch for Python 3. The re-raise behaviour reported by Antoine is already tested in test_raise.TestRaise.test_except_reraise(). My patch also clarifies some details about how __context__ is set: * Context is the exception being handled, not necessaril

[issue23556] Scope for raise without argument is different in Python 2 and 3

2015-07-21 Thread Ethan Furman
Changes by Ethan Furman : -- nosy: -ethan.furman ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue23556] Scope for raise without argument is different in Python 2 and 3

2015-03-13 Thread Ethan Furman
Changes by Ethan Furman : -- nosy: +ethan.furman ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue23556] Scope for raise without argument is different in Python 2 and 3

2015-03-07 Thread Martin Panter
Changes by Martin Panter : -- assignee: -> docs@python components: +Documentation nosy: +docs@python ___ Python tracker ___ ___ Pytho

[issue23556] Scope for raise without argument is different in Python 2 and 3

2015-03-07 Thread Martin Panter
Martin Panter added the comment: For the Python 3 case, the documentation is vague and probably wrong, depending on what you understand “the current scope” to mean. I think it should read something like . . . raise re-raises the current exception that is being handled. If no exception is bein

[issue23556] Scope for raise without argument is different in Python 2 and 3

2015-03-01 Thread Martin Panter
Changes by Martin Panter : -- nosy: +vadmium ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue23556] Scope for raise without argument is different in Python 2 and 3

2015-03-01 Thread SilentGhost
Changes by SilentGhost : -- nosy: +collinwinter ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue23556] Scope for raise without argument is different in Python 2 and 3

2015-03-01 Thread SilentGhost
SilentGhost added the comment: There is this bit in https://docs.python.org/3/library/exceptions.html : > When raising a new exception (rather than using a bare raise to re-raise the > exception currently being handled),... I presume this can be also suitable for tutorial if it's not already

[issue23556] Scope for raise without argument is different in Python 2 and 3

2015-03-01 Thread Antoine Amarilli
New submission from Antoine Amarilli: Hello, Python 2.7.8 and Python 3.4.2 (from Debian testing) have a different behavior on the attached file. Python 2 raises "bar", Python 3 raises "foo". I can't find an adequate explanation in the documentation for this behavior difference. It probably re