From b58750680f4133ef7e6162aa5aab16068c2f3d9e Mon Sep 17 00:00:00 2001 From: Irit Katriel Date: Thu, 7 Oct 2021 14:03:37 +0100 Subject: [PATCH 1/2] PEP-654: add mention of the syntax options discussion --- pep-0654.rst | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/pep-0654.rst b/pep-0654.rst index 2d47e5261a3..6daea713542 100644 --- a/pep-0654.rst +++ b/pep-0654.rst @@ -1375,6 +1375,22 @@ clauses. We rejected this because it would be less obvious. The fact that we are handling exception groups of ``T`` rather than only naked ``Ts`` should be specified in the same place where we state ``T``. +Alternative syntax options +-------------------------- + +Alternatives to the ``except*`` syntax were evaluated in a `discussion on python-dev +`_, and it was suggested to use +``except group``. Upon careful evaluation this was rejected because the following +would be ambiguous, as it is currently valid syntax where ``group`` is interpreted +as a callable. The same is true for any valid identifier. + +.. code-block:: + + try: + ... + except group (T1, T2): + ... + Programming Without 'except \*' =============================== @@ -1441,12 +1457,15 @@ exception tree whose nodes are exceptions from MultiError, and the ``split()`` API from the design document for MultiError V2. The discussions on python-dev and elsewhere helped us improve upon the first draft of the PEP in multiple ways, both the design and the exposition. For this we appreciate all those who -contributed ideas and asked good questions: Matthew Barnett, Ran Benita, -Emily Bowman, Joao Bueno, Baptiste Carvello, Nick Coghlan, Caleb Donovick, -Greg Ewing, Ethan Furman, Larry Hastings, Zac Hatfield-Dodds, Chris Jerdonek, -Jim Jewett, Sven Kunze, Glenn Linderman, Paul Moore, Ivan Pozdeev, Terry Reedy, -Barry Scott, Damian Shaw, Cameron Simpson, Paul Sokolovsky, Steve Stagg, -Marco Sulla, and Petr Viktorin. +contributed ideas and asked good questions: Ammar Askar, Matthew Barnett, +Ran Benita, Emily Bowman, Brandt Bucher, Joao Bueno, Baptiste Carvello, +Rob Cliffe, Nick Coghlan, Steven D'Aprano, Caleb Donovick, Steve Dower, +Greg Ewing, Ethan Furman, Pablo Salgado, Jonathan Goble, Thomas Grainger, +Larry Hastings, Zac Hatfield-Dodds, Chris Jerdonek, Jim Jewett, Sven Kunze, +Lukasz Langa, Glenn Linderman, Paul Moore, Antoine Pitrou, Ivan Pozdeev, +Patrick Reader, Terry Reedy, Sascha Schlemmer, Barry Scott, Mark Shannon, +Damian Shaw, Cameron Simpson, Gregory Smith, Paul Sokolovsky, Calvin Spealman, +Steve Stagg, Victor Stinner, Marco Sulla, Petr Viktorin and Barry Warsaw. References From 864f833c38402426b01f0f59e7e10edcd4088ad4 Mon Sep 17 00:00:00 2001 From: Irit Katriel <1055913+iritkatriel@users.noreply.github.com> Date: Fri, 8 Oct 2021 10:17:13 +0100 Subject: [PATCH 2/2] =?UTF-8?q?=C5=81ukasz?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pep-0654.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pep-0654.rst b/pep-0654.rst index 6daea713542..80af553a1ac 100644 --- a/pep-0654.rst +++ b/pep-0654.rst @@ -1462,7 +1462,7 @@ Ran Benita, Emily Bowman, Brandt Bucher, Joao Bueno, Baptiste Carvello, Rob Cliffe, Nick Coghlan, Steven D'Aprano, Caleb Donovick, Steve Dower, Greg Ewing, Ethan Furman, Pablo Salgado, Jonathan Goble, Thomas Grainger, Larry Hastings, Zac Hatfield-Dodds, Chris Jerdonek, Jim Jewett, Sven Kunze, -Lukasz Langa, Glenn Linderman, Paul Moore, Antoine Pitrou, Ivan Pozdeev, +Ɓukasz Langa, Glenn Linderman, Paul Moore, Antoine Pitrou, Ivan Pozdeev, Patrick Reader, Terry Reedy, Sascha Schlemmer, Barry Scott, Mark Shannon, Damian Shaw, Cameron Simpson, Gregory Smith, Paul Sokolovsky, Calvin Spealman, Steve Stagg, Victor Stinner, Marco Sulla, Petr Viktorin and Barry Warsaw.