[Python-Dev] Re: Does ensurepip still have to include a copy of setuptools?

2021-10-04 Thread Nick Coghlan
On Mon, 4 Oct 2021, 5:23 pm Antoine Pitrou, wrote: > On Sat, 2 Oct 2021 13:27:03 +0100 > Paul Moore wrote: > > On Sat, 2 Oct 2021 at 12:20, Thomas Grainger wrote: > > > > > > I raised an issue about this: https://github.com/pypa/pip/issues/10530 > > > > > I agree with the comment made on that i

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

2021-10-04 Thread Steven D'Aprano
On Mon, Oct 04, 2021 at 07:31:10PM +0100, Steve Dower wrote: > To me, the "*name" looks most similar to how we write "*args" in a > function definition, so I'd go for that. That's exactly why we *shouldn't* go for that option. That is going to confuse a lot of people that it is sequence unpackin

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

2021-10-04 Thread Terry Reedy
On 10/4/2021 9:57 AM, Ammar Askar wrote: Throwing in another +1 for `except group`. It's explicit, doesn't introduce new punctuation and avoids confusion with unpacking. I agree for same reasons. And avoids more bikeshedding. I checked and if 'except group' is added to keyword.kwlist *befor

[Python-Dev] [RELEASE] Python 3.10.0 is available

2021-10-04 Thread Pablo Galindo Salgado
On behalf of the Python development community and the Python 3.10 release team, I’m pleased to announce the availability of Python 3.10.0. Python 3.10.0 is the newest major release of the Python programming language, and it contains many new features and optimizations. https://www.python.org/downl

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

2021-10-04 Thread Rob Cliffe via Python-Dev
On 04/10/2021 00:57, Barry Warsaw wrote: On Oct 3, 2021, at 10:42, Łukasz Langa wrote: 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

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

2021-10-04 Thread Steve Dower
On 10/4/2021 5:47 PM, Antoine Pitrou wrote: On Mon, 4 Oct 2021 12:18:35 -0400 Calvin Spealman wrote: On Mon, Oct 4, 2021 at 12:07 PM Guido van Rossum wrote: The question was about which style to *recommend* (a la PEP-8). I think the very fact that it can't (or is difficult) be enforce

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

2021-10-04 Thread Calvin Spealman
On Mon, Oct 4, 2021 at 12:48 PM Antoine Pitrou wrote: > On Mon, 4 Oct 2021 12:18:35 -0400 > Calvin Spealman wrote: > > On Mon, Oct 4, 2021 at 12:07 PM Guido van Rossum > wrote: > > > > > The question was about which style to *recommend* (a la PEP-8). > > > > > > > I think the very fact that it

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

2021-10-04 Thread Glenn Linderman
On 10/3/2021 10: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. Seems like a good reason to promote   "except

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

2021-10-04 Thread Steven D'Aprano
On Mon, Oct 04, 2021 at 09:03:54AM -0700, Guido van Rossum wrote: > The question was about which style to *recommend* (a la PEP-8). Quote: "At the moment * is a separate token so both are allowed, but we could change that (e.g., make except* a token)" If that is mistaken, that's fine, no harm d

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

2021-10-04 Thread Antoine Pitrou
On Mon, 4 Oct 2021 12:18:35 -0400 Calvin Spealman wrote: > On Mon, Oct 4, 2021 at 12:07 PM Guido van Rossum wrote: > > > The question was about which style to *recommend* (a la PEP-8). > > > > I think the very fact that it can't (or is difficult) be enforced, How so? If style checkers are a

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

2021-10-04 Thread MRAB
On 2021-10-04 16:02, Jonathan Goble wrote: On Mon, Oct 4, 2021 at 1:24 AM Guido van Rossum > wrote: On Sun, Oct 3, 2021 at 9:20 PM Jonathan Goble mailto:jcgob...@gmail.com>> wrote: Therefore my vote is for requiring `except* E` and keeping `except *E

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

2021-10-04 Thread Calvin Spealman
On Mon, Oct 4, 2021 at 12:07 PM Guido van Rossum wrote: > The question was about which style to *recommend* (a la PEP-8). > I think the very fact that it can't (or is difficult) be enforced, and so in the wild we'll likely see variations that could lead to confusion, is enough reason to find an

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

2021-10-04 Thread Guido van Rossum
The question was about which style to *recommend* (a la PEP-8). On Mon, Oct 4, 2021 at 8:03 AM Jonathan Goble wrote: > On Mon, Oct 4, 2021 at 1:24 AM 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 kee

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

2021-10-04 Thread MRAB
On 2021-10-04 07:12, Greg Ewing wrote: 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 curre

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

2021-10-04 Thread Jonathan Goble
On Mon, Oct 4, 2021 at 1:24 AM 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. > Then what is the purpose of th

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

2021-10-04 Thread Mark Shannon
Another +1 for `except group` from me. On 04/10/2021 2:57 pm, Ammar Askar wrote: Throwing in another +1 for `except group`. It's explicit, doesn't introduce new punctuation and avoids confusion with unpacking. Regards, Ammar On Mon, Oct 4, 2021, 3:31 AM Antoine Pitrou

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

2021-10-04 Thread Victor Stinner
To stay consistent with PEP 8, exception groups should use 4 spaces. Victor On Sun, Oct 3, 2021 at 5:54 PM 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:

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

2021-10-04 Thread Łukasz Langa
> On 4 Oct 2021, at 15:00, Calvin Spealman 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? This is covered at length in the PEP. Those sections

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

2021-10-04 Thread Ammar Askar
Throwing in another +1 for `except group`. It's explicit, doesn't introduce new punctuation and avoids confusion with unpacking. Regards, Ammar On Mon, Oct 4, 2021, 3:31 AM Antoine Pitrou wrote: > On Sun, 3 Oct 2021 19:42:29 +0200 > Łukasz Langa wrote: > > > > -1 > > > > If I could read the v

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

2021-10-04 Thread Calvin Spealman
On Sun, Oct 3, 2021 at 11:48 AM 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

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

2021-10-04 Thread Damian Shaw
I'm confused, if you can't do that then what is Irit asking? I thought that: > 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. Meant exactly that wa

[Python-Dev] Re: Does ensurepip still have to include a copy of setuptools?

2021-10-04 Thread Paul Moore
On Mon, 4 Oct 2021 at 08:21, Antoine Pitrou wrote: > > On Sat, 2 Oct 2021 13:27:03 +0100 > Paul Moore wrote: > > On Sat, 2 Oct 2021 at 12:20, Thomas Grainger wrote: > > > > > > I raised an issue about this: https://github.com/pypa/pip/issues/10530 > > > > I agree with the comment made on that is

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

2021-10-04 Thread Antoine Pitrou
On Sun, 3 Oct 2021 19:42:29 +0200 Łukasz Langa wrote: > > -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: > ...

[Python-Dev] Re: Does ensurepip still have to include a copy of setuptools?

2021-10-04 Thread Antoine Pitrou
On Sat, 2 Oct 2021 13:27:03 +0100 Paul Moore wrote: > On Sat, 2 Oct 2021 at 12:20, Thomas Grainger wrote: > > > > I raised an issue about this: https://github.com/pypa/pip/issues/10530 > > I agree with the comment made on that issue - this isn't the right way > to handle the problem. We need t

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

2021-10-04 Thread Paul Moore
On Mon, 4 Oct 2021 at 07:16, Greg Ewing wrote: > > 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. > > >