1. except *E as e: // except *(E1, E2) as e:2. except* E as e: // except* (E1, E2) as e:
_______________________________________________
Python-Dev mailing list -- pytho...@python.org
To unsubscribe send an email to python-d...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at https://mail.python.org/archives/list/pytho...@python.org/message/4B256YKUPW5P2M44GG5H6FBL3PSV6ODP/
Code of Conduct: http://python.org/psf/codeofconduct/
Code of Conduct: http://python.org/psf/codeofconduct/
We can drop except. Say:
try:
..
handle T1:
…
handle T2:
…
Or ‘catch’, or something else.
I know it's a bit late for bikeshedding this thing so if we want to be conservative and stick to the current syntactical options already defined in PEP 654, I'm voting Option 2 (given the awkwardness of the *(E1, E2) example).
- Ł
_______________________________________________
Python-Dev mailing list -- pytho...@python.org
To unsubscribe send an email to python-d...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
On Sun, Oct 03, 2021 at 11:34:55AM -0700, Guido van Rossum wrote:
> I also think that the bar should be pretty high before we reopen the
> *syntax* -- the PEP was approved without anyone (neither the SC, nor
> Nathaniel, nor anyone else) providing any feedback on the use of 'except
> *'. So I think it's a bit late to be bikeshedding the syntax. This thread
> was meant to solicit feedback on how to *format* it: does the space go
> before or after the '*'.
`except* E`, otherwise it looks like unpacking E.
Therefore my vote is for requiring `except* E` and keeping `except *E` as a SyntaxError.
_______________________________________________
Python-Dev mailing list -- pytho...@python.org
To unsubscribe send an email to python-d...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at https://mail.python.org/archives/list/pytho...@python.org/message/F2JUI7SWTQE6RJ4YYKQHJ233BERZHYWR/
_______________________________________________
Python-Dev mailing list -- pytho...@python.org
To unsubscribe send an email to python-d...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Code of Conduct: http://python.org/psf/codeofconduct/
On 4 Oct 2021, at 15:00, Calvin Spealman <cspe...@redhat.com> wrote:It is difficult to understand why any special syntax is needed at all. ExceptionGroup is still an exception class like any other, isn't it? Why wouldn't the existing syntax suffice?
On Sun, Oct 3, 2021 at 9:20 PM Jonathan Goble <jcgo...@gmail.com> wrote:Therefore my vote is for requiring `except* E` and keeping `except *E` as a SyntaxError.You can't do that with our current lexer+parser.
The question was about which style to *recommend* (a la PEP-8).
_______________________________________________
Python-Dev mailing list -- pytho...@python.org
To unsubscribe send an email to python-d...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Code of Conduct: http://python.org/psf/codeofconduct/