[Python-Dev] Re: PEP 654 except* formatting

2021-10-03 Thread Greg Ewing

On 4/10/21 6:23 pm, Guido van Rossum wrote:
On Sun, Oct 3, 2021 at 9:20 PM Jonathan Goble > 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.


I don't think it would be desirable in any case. The separation of
tokens into alphanumeric and non-alphanumeric is deeply embedded in
every Python programmer's brain by now, and we shouldn't mess with
it.

--
Greg
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/XQXJEGYAWBTAUQI3BEIXDZO4SERAJYWF/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: PEP 654 except* formatting

2021-10-03 Thread Guido van Rossum
On Sun, Oct 3, 2021 at 9:20 PM Jonathan Goble  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.

-- 
--Guido van Rossum (python.org/~guido)
*Pronouns: he/him **(why is my pronoun here?)*

___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/F2JUI7SWTQE6RJ4YYKQHJ233BERZHYWR/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: PEP 654 except* formatting

2021-10-03 Thread Jonathan Goble
On Sun, Oct 3, 2021 at 11:40 PM Steven D'Aprano  wrote:

> 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.
>

I think it's worth noting that the following is already legal:

Python 3.9.7 (tags/v3.9.7:1016ef3, Aug 30 2021, 20:19:38) [MSC v.1929 64
bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> exceptions = (ValueError, TypeError)
>>> try:
...   raise TypeError
... except exceptions:
...   print("caught")
...
caught

Indeed, when I first learned that you could do this (a few years ago IIRC),
my first thought was to unpack the "exceptions" tuple with a star. It
wasn't until I tried that and got a SyntaxError that I tried it the way
shown here and it worked.

Allowing `except *E` for this new feature would take that
helpful-to-a-beginner SyntaxError and turn it into a subtle and unhelpful
bug.

Therefore my vote is for requiring `except* E` and keeping `except *E` as a
SyntaxError.
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/2TBZZSMZXNYFJNPLIESFNFDNDX5K6A5X/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: PEP 654 except* formatting

2021-10-03 Thread Steven D'Aprano
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.

Done! Bikeshedding is over! *wink*

All joking aside, my preference is to put the star on the except, not 
the exceptions. I don't think I have anything more to say that hasn't 
already been said, so I'll bow out now.

-- 
Steve
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/5TRLGMHCOTEF3MMR6GR35TLG6TPG63VJ/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: PEP 654 except* formatting

2021-10-03 Thread Barry Warsaw
On Oct 3, 2021, at 10:42, Łukasz Langa  wrote:
> 
> My idea is this:
> 
> try:
>...
> except group E as e:
>...
> except group E1, T2 as e:
>...
> 
> Should be doable given the magical match-case contextual keywords precedent. 
> This looks nice and is explicit, since you will always get an ExceptionGroup 
> instance under `e`. But 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).

Speaking just for myself, the `except *` syntax always bothered me, but I 
couldn’t come up with anything better and it wasn’t enough for me to vote 
against PEP 654.  `except group` is nicer though, and I would be in favor of 
that, or something like it.

We could of course bike shed on the syntax forever.  The PSC did vote to accept 
the PEP but we left room for changes while during the 3.11 cycle.

-Barry



signature.asc
Description: Message signed with OpenPGP
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/7KHAN76UA5JRND2M2EMVLKML665KQDTC/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: PEP 654 except* formatting

2021-10-03 Thread Gregory P. Smith
On Sun, Oct 3, 2021 at 10:47 AM Łukasz Langa  wrote:

>
>  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).
>

+1 on the `except* E` Option 2 syntax. It better conveys its uniqueness and
non-relation to other meanings of *.

Someone mentioned allowing both and letting people decide.  Whatever is
chosen, please not that.  There should be only one way to write this.  That
avoids style arguments when no auto-formatter is involved.

-gps


>
> - Ł
> ___
> Python-Dev mailing list -- python-dev@python.org
> To unsubscribe send an email to python-dev-le...@python.org
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at
> https://mail.python.org/archives/list/python-dev@python.org/message/T7QZJ575RFNYZ5KMYD66YMR2ZLNDVF56/
> Code of Conduct: http://python.org/psf/codeofconduct/
>
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/T5FOZVPJ2YWIQ25HRSQ5NZ6U3YMDKI7K/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: PEP 654 except* formatting

2021-10-03 Thread Łukasz Langa

> On 3 Oct 2021, at 20:11, MRAB  wrote:
> 
> On 2021-10-03 18:50, Brandt Bucher wrote:
>> Łukasz Langa wrote:
>>> My idea is this:
>>> try:
>>>...
>>> except group E as e:
>>>...
>>> except group E1, T2 as e:
>>>...
>>> Should be doable given the magical match-case contextual keywords 
>>> precedent. This looks nice and is explicit, since you will always get an 
>>> ExceptionGroup instance under `e`.
>> Heh, we crossed posts with the soft keywords. I like your idea (“except 
>> group”) better than mine (“except each”).
>> If we want to use an existing keyword instead of a soft keyword, how
> about "except in E as e:".
> 
> The disadvantage, as I see it, from a linguistic point of view, is that 
> "except in" could be read as "excluding", but, then, so could "except each" 
> ("excluding each of these") and "except group" ("excluding this group").

If you're thinking that, then doesn't "except KeyError" mean "everything except 
for KeyErrors"? I don't see the problem.

- Ł


signature.asc
Description: Message signed with OpenPGP
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/DRC53PSOZR7RWH56U7EC7KBJLP6NG4EK/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: PEP 654 except* formatting

2021-10-03 Thread Guido van Rossum
On Sun, Oct 3, 2021 at 11:28 AM Irit Katriel via Python-Dev <
python-dev@python.org> wrote:

> We can drop except. Say:
>
> try:
>   ..
> handle T1:
>…
> handle T2:
>…
>
> Or ‘catch’, or something else.
>

We're going around in circles. We considered 'catch' early on, but decided
against it since, comparing 'except E' and 'catch E', there would be no
good way to tell which is the recommended one (and the same would apply to
another single keyword like 'handle'). At least with 'except*', it's easy
to remember that this is a modified version of 'except', so it's probably
meant for a special case.

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 '*'.

-- 
--Guido van Rossum (python.org/~guido)
*Pronouns: he/him **(why is my pronoun here?)*

___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/CVSZ6B3E7Q3O64RVD6T6VKHOXGQGV5QS/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: PEP 654 except* formatting

2021-10-03 Thread Irit Katriel via Python-Dev
We can drop except. Say:

try:
  ..
handle T1:
   …
handle T2:
   …

Or ‘catch’, or something else.


> On 3 Oct 2021, at 19:12, MRAB  wrote:
> 
> On 2021-10-03 18:50, Brandt Bucher wrote:
>> Łukasz Langa wrote:
>>> My idea is this:
>>> try:
>>>...
>>> except group E as e:
>>>...
>>> except group E1, T2 as e:
>>>...
>>> Should be doable given the magical match-case contextual keywords 
>>> precedent. This looks nice and is explicit, since you will always get an 
>>> ExceptionGroup instance under `e`.
>> Heh, we crossed posts with the soft keywords. I like your idea (“except 
>> group”) better than mine (“except each”).
>> If we want to use an existing keyword instead of a soft keyword, how 
> about "except in E as e:".
> 
> The disadvantage, as I see it, from a linguistic point of view, is that 
> "except in" could be read as "excluding", but, then, so could "except each" 
> ("excluding each of these") and "except group" ("excluding this group").
> ___
> Python-Dev mailing list -- python-dev@python.org
> To unsubscribe send an email to python-dev-le...@python.org
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at 
> https://mail.python.org/archives/list/python-dev@python.org/message/FUTYE36MLFAWU72KTHDEQY5JFDA2PQ4G/
> Code of Conduct: http://python.org/psf/codeofconduct/
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/K3I7552LB6O5XS3KWLC2C2U5XME43HQ5/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: PEP 654 except* formatting

2021-10-03 Thread MRAB

On 2021-10-03 18:50, Brandt Bucher wrote:

Łukasz Langa wrote:

My idea is this:
try:
...
except group E as e:
...
except group E1, T2 as e:
...
Should be doable given the magical match-case contextual keywords precedent. 
This looks nice and is explicit, since you will always get an ExceptionGroup 
instance under `e`.


Heh, we crossed posts with the soft keywords. I like your idea (“except group”) 
better than mine (“except each”).
If we want to use an existing keyword instead of a soft keyword, how 

about "except in E as e:".

The disadvantage, as I see it, from a linguistic point of view, is that 
"except in" could be read as "excluding", but, then, so could "except 
each" ("excluding each of these") and "except group" ("excluding this 
group").

___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/FUTYE36MLFAWU72KTHDEQY5JFDA2PQ4G/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: PEP 654 except* formatting

2021-10-03 Thread Brandt Bucher
Łukasz Langa wrote:
> My idea is this:
> try:
> ...
> except group E as e:
> ...
> except group E1, T2 as e:
> ...
> Should be doable given the magical match-case contextual keywords precedent. 
> This looks nice and is explicit, since you will always get an ExceptionGroup 
> instance under `e`.

Heh, we crossed posts with the soft keywords. I like your idea (“except group”) 
better than mine (“except each”).
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/4FPTSD6VAIJD2WSP63KQUOQLDAOI3EWR/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: PEP 654 except* formatting

2021-10-03 Thread Brandt Bucher
Irit Katriel wrote:
> It is also not too late to opt for a completely different syntax if a better 
> one is suggested.

Honestly, I’ve never been a fan of the PEP’s proposed star syntax.

If we’re okay adding a soft keyword, though, something like “except each” could 
help communicate the meaning of the blocks a bit more explicitly. I’m pretty 
sure that grammar would be unambiguous in all cases.
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/44TWMI3PV3TKRL6ZJ4YU3GMQ6W43EHU5/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: PEP 654 except* formatting

2021-10-03 Thread Łukasz Langa

> On 3 Oct 2021, at 18:37, Steven D'Aprano  wrote:
> 
> On Sun, Oct 03, 2021 at 04:47:57PM +0100, Irit Katriel via Python-Dev wrote:
>> We wonder if people have a view on which of the following is clearer/better:
>> 
>> 1. except *E as e:  //  except *(E1, E2) as e:
> 
> That looks like you're unpacking the tuple (E1, E2), and that's just
> misleading and wrong.

Interestingly, IIRC this was the original intention: `except *E as e` means 
you're unpacking E from some group.
I agree this is a somewhat convoluted analogy and it breaks down in the 
presence of a tuple of exception names.


>> 2. except* E as e:  //  except* (E1, E2) as e:
> 
> But Thomas Grainger's comment about match semantics got me thinking.

Uh oh ;-)


> I think his suggestion is a bit too verbose, but how do people feel about
> borrowing the vertical line and using it like this:
> 
>except| E as e:
>except| (E1, E2) as e:


-1

If I could read the vertical line as a pipe character, the expression would 
read "except or E as e".
But I can't read it that way anyway. Instead, all I see is a lowercase EXCEPTL.

My idea is this:

try:
...
except group E as e:
...
except group E1, T2 as e:
...

Should be doable given the magical match-case contextual keywords precedent. 
This looks nice and is explicit, since you will always get an ExceptionGroup 
instance under `e`. But 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).


- Ł


signature.asc
Description: Message signed with OpenPGP
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/T7QZJ575RFNYZ5KMYD66YMR2ZLNDVF56/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: PEP 654 except* formatting

2021-10-03 Thread Steven D'Aprano
On Sun, Oct 03, 2021 at 04:47:57PM +0100, Irit Katriel via Python-Dev wrote:
> We wonder if people have a view on which of the following is clearer/better:
> 
> 1. except *E as e:  //  except *(E1, E2) as e:

That looks like you're unpacking the tuple (E1, E2), and that's just 
misleading and wrong.

> 2. except* E as e:  //  except* (E1, E2) as e:

That looks like it is the "except" keyword which is special, not the 
tuple. If we're going to have yet another meaning for star 
(multiplication, replication, unpacking, powers, wildcard imports...) 
then I vote for 2.

But Thomas Grainger's comment about match semantics got me thinking. I 
think his suggestion is a bit too verbose, but how do people feel about 
borrowing the vertical line and using it like this:

except| E as e:
except| (E1, E2) as e:

Again, it's attached to the except keyword, to indicate that it's the 
keyword which is special, not a unary prefix operator on the E.

The vertical line is suggestive of grouping something with a box around 
it:

+-+
| group of things |
+-+

and of the lines used in tracebacks shown in the PEP. So the output 
helps remind you of the syntax.



-- 
Steve
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/EA7E3EGQ6WB5O3ITPTN53C4CMFHDLBFK/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: PEP 654 except* formatting

2021-10-03 Thread Jim J. Jewett
except* looks like the exception statement has a footnote, which isn't wrong.

*(E1, E2) looks like they are being unpacked, which is wrong.

-jJ
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/7IKS3YFPFT5JO7QBJGNPMM33XUYKK7CK/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: PEP 654 except* formatting

2021-10-03 Thread Paul Moore
On Sun, 3 Oct 2021 at 16:55, Irit Katriel via Python-Dev
 wrote:
>
> We wonder if people have a view on which of the following is clearer/better:
>
> 1. except *E as e:  //  except *(E1, E2) as e:
> 2. except* E as e:  //  except* (E1, E2) as e:
>
> (The difference is in the whitespace around the *).

I prefer (1). I never liked C declarations where the * was attached to
the type rather than the variable, and I have the same dislike here.

> At the moment * is a separate token so both are allowed, but we could change 
> that (e.g., make except* a token), and in any case we need to settle on a 
> convention that we use in documentation, etc.

Having said the above, it's a matter of taste/preference, so I think
that allowing both is the correct thing to do.

> It is also not too late to opt for a completely different syntax if a better 
> one is suggested.

Let's stick with "except *". It doesn't seem productive to have
another round of bikeshedding at this point, unless there's a really
compelling technical reason (i.e., something significantly more than
mere bikeshedding).

Paul
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/BZ55ZMS5S5E7KPNP7AR7N2BSA35KVKF3/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: PEP 654 except* formatting

2021-10-03 Thread Guido van Rossum
We’ll, typically you don’t explicitly mention ExceptionGroup — it’s implied
by the ‘except*’ syntax. Introducing match semantics probably wouldn’t open
up new functionality, you can already write ‘except (E1, E2):’.

On Sun, Oct 3, 2021 at 09:00 Thomas Grainger  wrote:

> What about `except case ExceptionGroup[E1 | E2]:`? and use match semantics?
>
> On Sun, 3 Oct 2021, 16:50 Irit Katriel via Python-Dev, <
> python-dev@python.org> wrote:
>
>>
>> We wonder if people have a view on which of the following is
>> clearer/better:
>>
>> 1. except *E as e:  //  except *(E1, E2) as e:
>> 2. except* E as e:  //  except* (E1, E2) as e:
>>
>> (The difference is in the whitespace around the *).
>>
>> At the moment * is a separate token so both are allowed, but we could
>> change that (e.g., make except* a token), and in any case we need to settle
>> on a convention that we use in documentation, etc.
>>
>> It is also not too late to opt for a completely different syntax if a
>> better one is suggested.
>>
>>
>> ___
>> Python-Dev mailing list -- python-dev@python.org
>> To unsubscribe send an email to python-dev-le...@python.org
>> https://mail.python.org/mailman3/lists/python-dev.python.org/
>> Message archived at
>> https://mail.python.org/archives/list/python-dev@python.org/message/4B256YKUPW5P2M44GG5H6FBL3PSV6ODP/
>> Code of Conduct: http://python.org/psf/codeofconduct/
>>
> ___
> Python-Dev mailing list -- python-dev@python.org
> To unsubscribe send an email to python-dev-le...@python.org
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at
> https://mail.python.org/archives/list/python-dev@python.org/message/XNZNX2M2PQ24VEH5GWCGVFS5EY6XMRAX/
> Code of Conduct: http://python.org/psf/codeofconduct/
>
-- 
--Guido (mobile)
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/WJGWKUPTTLZW37R3B5W33FRBSFMK3CUE/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: PEP 654 except* formatting

2021-10-03 Thread Thomas Grainger
What about `except case ExceptionGroup[E1 | E2]:`? and use match semantics?

On Sun, 3 Oct 2021, 16:50 Irit Katriel via Python-Dev, <
python-dev@python.org> wrote:

>
> We wonder if people have a view on which of the following is
> clearer/better:
>
> 1. except *E as e:  //  except *(E1, E2) as e:
> 2. except* E as e:  //  except* (E1, E2) as e:
>
> (The difference is in the whitespace around the *).
>
> At the moment * is a separate token so both are allowed, but we could
> change that (e.g., make except* a token), and in any case we need to settle
> on a convention that we use in documentation, etc.
>
> It is also not too late to opt for a completely different syntax if a
> better one is suggested.
>
>
> ___
> Python-Dev mailing list -- python-dev@python.org
> To unsubscribe send an email to python-dev-le...@python.org
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at
> https://mail.python.org/archives/list/python-dev@python.org/message/4B256YKUPW5P2M44GG5H6FBL3PSV6ODP/
> Code of Conduct: http://python.org/psf/codeofconduct/
>
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/XNZNX2M2PQ24VEH5GWCGVFS5EY6XMRAX/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] PEP 654 except* formatting

2021-10-03 Thread Irit Katriel via Python-Dev
We wonder if people have a view on which of the following is clearer/better:

1. except *E as e:  //  except *(E1, E2) as e:
2. except* E as e:  //  except* (E1, E2) as e:

(The difference is in the whitespace around the *).

At the moment * is a separate token so both are allowed, but we could
change that (e.g., make except* a token), and in any case we need to settle
on a convention that we use in documentation, etc.

It is also not too late to opt for a completely different syntax if a
better one is suggested.
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/4B256YKUPW5P2M44GG5H6FBL3PSV6ODP/
Code of Conduct: http://python.org/psf/codeofconduct/