[issue21366] Document that return in finally overwrites prev value

2014-05-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset faaa8d569664 by Zachary Ware in branch '3.4': Issue #21366: Document the fact that ``return`` in a ``finally`` clause http://hg.python.org/cpython/rev/faaa8d569664 New changeset 685f92aad1dc by Zachary Ware in branch 'default': Issue #21366:

[issue21366] Document that return in finally overwrites prev value

2014-05-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7fabe3652ee0 by Zachary Ware in branch '2.7': Issue #21366: Document the fact that ``return`` in a ``finally`` clause http://hg.python.org/cpython/rev/7fabe3652ee0 -- ___ Python tracker

[issue21366] Document that return in finally overwrites prev value

2014-05-06 Thread Zachary Ware
Zachary Ware added the comment: Done. Thanks pointing out just how redundant that parenthetical was (I don't know how that slipped through my brain...), David. And thank you Jon for the report! -- resolution: - fixed stage: patch review - resolved status: open - closed versions:

[issue21366] Document that return in finally overwrites prev value

2014-05-05 Thread Zachary Ware
Zachary Ware added the comment: How's this, or is it too much? -- keywords: +patch nosy: +zach.ware Added file: http://bugs.python.org/file35154/issue21366.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21366

[issue21366] Document that return in finally overwrites prev value

2014-05-05 Thread Zachary Ware
Changes by Zachary Ware zachary.w...@gmail.com: -- stage: - patch review type: behavior - enhancement versions: +Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21366

[issue21366] Document that return in finally overwrites prev value

2014-05-05 Thread R. David Murray
R. David Murray added the comment: I would remove the parenthetical (it was so stated in immediately preceding paragraph and thus is redundant), and instead of win, I would say will always be the last one executed. -- ___ Python tracker

[issue21366] Document that return in finally overwrites prev value

2014-05-02 Thread Éric Araujo
Éric Araujo added the comment: Thanks, your proposed wording sounds good to me. David (picked you seni-randomly as a senior core dev and native speaker), what do you think? -- nosy: +eric.araujo, r.david.murray ___ Python tracker

[issue21366] Document that return in finally overwrites prev value

2014-05-02 Thread R. David Murray
R. David Murray added the comment: The precisionist in me isn't quite happy, but any wording I've come up with to make it more precise isn't as informative :) (The 'real' situation is that the return value of the function is determined by the last return statement executed, which in turn is

[issue21366] Document that return in finally overwrites prev value

2014-04-27 Thread Jon Brandvein
New submission from Jon Brandvein: def foo(): try: return 1 finally; return 2 print(foo()) # 2 I've seen this peculiar case discussed on a few blogs lately, but was unable to find confirmation that this behavior is defined. In the try/finally section of