[issue20739] PEP 463 (except expression) implementation

2016-04-16 Thread Berker Peksag
Changes by Berker Peksag : -- resolution: -> rejected stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue20739] PEP 463 (except expression) implementation

2015-01-13 Thread Berker Peksag
Berker Peksag added the comment: Guido's comment about the PEP is at https://mail.python.org/pipermail/python-dev/2014-March/133118.html Can we close this and mark PEP 463 as rejected now? -- nosy: +berker.peksag ___ Python tracker

[issue20739] PEP 463 (except expression) implementation

2015-01-13 Thread Martin Panter
Changes by Martin Panter vadmium...@gmail.com: -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20739 ___ ___ Python-bugs-list

[issue20739] PEP 463 (except expression) implementation

2014-03-27 Thread Yury Selivanov
Changes by Yury Selivanov yselivanov...@gmail.com: -- nosy: -yselivanov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20739 ___ ___

[issue20739] PEP 463 (except expression) implementation

2014-03-27 Thread Josh Rosenberg
Josh Rosenberg added the comment: It's not part of the PEP, but what happens with the new syntax if there is an existing exception context? Some utilities (e.g. functools.lru_cache) use dict.get over a try/except because they operate under the assumption that they may be invoked within an

[issue20739] PEP 463 (except expression) implementation

2014-03-27 Thread Thomas Wouters
Thomas Wouters added the comment: The implementation in the patch preserves the exception context. It's probably the thing that took the most code, and it's why there's two new opcodes in the patch :) It's covered in the tests, too. -- ___ Python

[issue20739] PEP 463 (except expression) implementation

2014-02-27 Thread Chris Angelico
Chris Angelico added the comment: One test failing, due to Tools/parser/unparse.py not knowing how to unparse an except expression. Otherwise, test suite passes (with most of the stdlib unchanged). I'm about to try writing an actual conversion script which will rewrite the stdlib, and then

[issue20739] PEP 463 (except expression) implementation

2014-02-27 Thread Chris Angelico
Chris Angelico added the comment: I've applied all the changes my script can find, including ones that are actually quite inappropriate, like: try: some_function_call() except some_exception: some_other_function_call() All tests pass except for one, which I don't fully

[issue20739] PEP 463 (except expression) implementation

2014-02-27 Thread Chris Angelico
Changes by Chris Angelico ros...@gmail.com: Added file: http://bugs.python.org/file34250/churn1.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20739 ___

[issue20739] PEP 463 (except expression) implementation

2014-02-27 Thread Chris Angelico
Changes by Chris Angelico ros...@gmail.com: Added file: http://bugs.python.org/file34251/churn2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20739 ___

[issue20739] PEP 463 (except expression) implementation

2014-02-27 Thread Chris Angelico
Changes by Chris Angelico ros...@gmail.com: Added file: http://bugs.python.org/file34252/broken.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20739 ___

[issue20739] PEP 463 (except expression) implementation

2014-02-23 Thread Thomas Wouters
Thomas Wouters added the comment: http://hg.python.org/features/pep-463-except-expr now contains a version of the patch that makes the parentheses mandatory, similar to generator expressions. (Leaving the old patch for reference.) -- hgrepos: +218

[issue20739] PEP 463 (except expression) implementation

2014-02-23 Thread Thomas Wouters
Changes by Thomas Wouters tho...@python.org: Added file: http://bugs.python.org/file34205/5c078eb8da39.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20739 ___

[issue20739] PEP 463 (except expression) implementation

2014-02-22 Thread Thomas Wouters
New submission from Thomas Wouters: Here is a preliminary implementation of PEP 463, minus mandatory parentheses and with the most straightforward precedence rule: equal to if-expr -- which means this: A if C else B except E: D is parsed as A if C else (B except E: D) (because of

[issue20739] PEP 463 (except expression) implementation

2014-02-22 Thread Chris Angelico
Changes by Chris Angelico ros...@gmail.com: -- nosy: +Rosuav ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20739 ___ ___ Python-bugs-list mailing

[issue20739] PEP 463 (except expression) implementation

2014-02-22 Thread Yury Selivanov
Changes by Yury Selivanov yselivanov...@gmail.com: -- nosy: +yselivanov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20739 ___ ___