[Python-Dev] Re: Suggestion About Python Syntax

2021-03-03 Thread Joao S. O. Bueno
That is covered. Try typing "from __future__ import braces". On Wed, 3 Mar 2021 at 14:47, Anthony Farino wrote: > I love the Python scripting language, but there’s something that would > make it much better. Almost every other programming language uses curly > braces to enclose blocks of code

[Python-Dev] Re: Suggestion About Python Syntax

2021-03-03 Thread George Harding
Hi Anthony, The python-dev mailing list is used for discussion between the python core developers. I'll forward your suggestion to the python-ideas mailing list, where many interesting ideas for python are discussed: https://mail.python.org/archives/list/python-id...@python.org/ Best, George

[Python-Dev] Re: Suggestion About Python Syntax

2021-03-03 Thread Senthil Kumaran
Hello Anthony, Welcome to this list. :) Python is written in C, and developers use semicolons and branches in C. However, when Guido designed Python, he specifically wanted white-space indented language. The idea was it will be less intimidating to beginners and more readables. It seems to have

[Python-Dev] PEP 651, Robust Stack Overflow Handling, Rejection notice

2021-03-03 Thread Python Steering Council
Hi Mark, Thank you for submitting PEP 651. The Steering Council has spent the past two weeks reviewing PEP 651. After careful consideration, we have decided to reject the PEP. The following were the key points that led us to this decision: * The benefits are not compelling enough. Deep

[Python-Dev] Re: PEP 654 -- Exception Groups and except* : request for feedback for SC submission

2021-03-03 Thread Paul Moore
Sorry, I keep thinking I've finished and you keep making interesting points :-) On Wed, 3 Mar 2021 at 17:01, Irit Katriel wrote: > Raising an ExceptionGroup is an API change. If you call APIs that say they > will raise ExceptionGroups you need to update your code accordingly. If a > library

[Python-Dev] Re: PEP 654 -- Exception Groups and except* : request for feedback for SC submission

2021-03-03 Thread Irit Katriel via Python-Dev
On Wed, Mar 3, 2021 at 6:57 PM Paul Moore wrote: > Sorry, I keep thinking I've finished and you keep making interesting > points :-) > > On Wed, 3 Mar 2021 at 17:01, Irit Katriel > wrote: > > > Raising an ExceptionGroup is an API change. If you call APIs that say > they will raise

[Python-Dev] Re: PEP 654 -- Exception Groups and except* : request for feedback for SC submission

2021-03-03 Thread Sven R. Kunze
Hey Irit, find my 3 answers below: On 03.03.21 13:17, Irit Katriel wrote: Hi Sven, I like your formatting suggestion, thanks. I will do something like that. You're welcome. I'm not sure I understand your question. ExceptionGroup is a subclass of Exception (which is a subclass of

[Python-Dev] Re: PEP 654 -- Exception Groups and except* : request for feedback for SC submission

2021-03-03 Thread Greg Ewing
On 4/03/21 5:37 am, Paul Moore wrote: frameworks and libraries typically have to interact with other users' code, and there the contract has changed from "do what you like in your code and I'll cope" to "do what you like in your code as long as you don't let an exception group escape, and I'll

[Python-Dev] Re: PEP 654 -- Exception Groups and except* : request for feedback for SC submission

2021-03-03 Thread Irit Katriel via Python-Dev
On Wed, Mar 3, 2021 at 10:39 PM Greg Ewing wrote: > On 4/03/21 5:37 am, Paul Moore wrote: > > frameworks and libraries typically have to interact with other users' > > code, and there the contract has changed from "do what you like in > > your code and I'll cope" to "do what you like in your

[Python-Dev] Re: PEP 654 -- Exception Groups and except* : request for feedback for SC submission

2021-03-03 Thread Guido van Rossum
On Wed, Mar 3, 2021 at 11:26 AM Irit Katriel via Python-Dev < python-dev@python.org> wrote: > > > On Wed, Mar 3, 2021 at 6:57 PM Paul Moore wrote: > >> Sorry, I keep thinking I've finished and you keep making interesting >> points :-) >> >> On Wed, 3 Mar 2021 at 17:01, Irit Katriel >> wrote: >>

[Python-Dev] Re: Python Language Summit 2021 Signups Are Now Open

2021-03-03 Thread Mariatta
Sign up to Python Language Summit is still open for about 3 more weeks. So far we received 32 sign ups, from 18 different regions, and 12 time zones to work with. We've only received 3 topics of discussions, and we definitely need more of those. If you have a topic to be discussed with Python

[Python-Dev] Re: PEP 654 -- Exception Groups and except* : request for feedback for SC submission

2021-03-03 Thread Irit Katriel via Python-Dev
Hi Sven, This is all about the popularity of "except Exception". Look at the hierarchy of builtin exceptions: https://docs.python.org/3/library/exceptions.html#exception-hierarchy Most exceptions are subclasses of Exception. There are a few which are not, because they typically mean "this

[Python-Dev] Re: PEP 654 -- Exception Groups and except* : request for feedback for SC submission

2021-03-03 Thread Glenn Linderman
On 3/3/2021 2:49 PM, Irit Katriel via Python-Dev wrote: On Wed, Mar 3, 2021 at 10:39 PM Greg Ewing mailto:greg.ew...@canterbury.ac.nz>> wrote: On 4/03/21 5:37 am, Paul Moore wrote: > frameworks and libraries typically have to interact with other users' > code, and there the

[Python-Dev] Re: PEP 654 -- Exception Groups and except* : request for feedback for SC submission

2021-03-03 Thread Paul Moore
On Tue, 2 Mar 2021 at 21:46, Irit Katriel via Python-Dev wrote: > As an aside - I found it interesting that the option to wrap BaseException > instances by an Exception, which came up a couple of times in this thread, > didn't generate any anxiety. Probably because it wasn't clear that was

[Python-Dev] Re: PEP 654 -- Exception Groups and except* : request for feedback for SC submission

2021-03-03 Thread Irit Katriel via Python-Dev
Hi Sven, I like your formatting suggestion, thanks. I will do something like that. I'm not sure I understand your question. ExceptionGroup is a subclass of Exception (which is a subclass of BaseException). So ExceptionGroup is caught by "except Exception" or "except BaseException".

[Python-Dev] Re: PEP 654 -- Exception Groups and except* : request for feedback for SC submission

2021-03-03 Thread Irit Katriel via Python-Dev
Hi Paul, I agree that your condition (1) is essential, while condition (2) is desirable. (I explained in the email you replied to why I think 2 is less critical than 1). The current state of the PEP is that ExceptionGroup does not wrap BaseExceptions and is caught by "except Exception", while

[Python-Dev] Re: PEP 654 -- Exception Groups and except* : request for feedback for SC submission

2021-03-03 Thread Paul Moore
On Wed, 3 Mar 2021 at 12:37, Irit Katriel wrote: > This is covered the PEP, but TL;DR: > If we could make "except KeyboardInterrupt" catch > BaseExceptionGroup([KeyboardInterrupt]) in a reasonably backwards compatible > way then we wouldn't need except*. [...] > As you noted, no library is

[Python-Dev] Re: PEP 654 -- Exception Groups and except* : request for feedback for SC submission

2021-03-03 Thread Irit Katriel via Python-Dev
Hi Paul, On Wed, Mar 3, 2021 at 2:20 PM Paul Moore wrote: > > 1. Having now read the PEP, I don't actually see a use case for > grouping BaseExceptions. Why would anyone catch KeyboardInterrupt or > SystemExit and wrap them in a BaseExceptionGroup anyway? It seems to > me that the right thing

[Python-Dev] Re: PEP 654 -- Exception Groups and except* : request for feedback for SC submission

2021-03-03 Thread Paul Moore
On Wed, 3 Mar 2021 at 14:59, Irit Katriel wrote: >> 2. Given the above, why even have a means of grouping BaseExceptions >> at all? Why not just have ExceptionGroup that can only catch instances >> of Exception? > > Because the IGotInterrupted alternative involves wrapping a BaseException by >

[Python-Dev] Re: PEP 654 -- Exception Groups and except* : request for feedback for SC submission

2021-03-03 Thread Irit Katriel via Python-Dev
On Wed, Mar 3, 2021 at 4:37 PM Paul Moore wrote: > > Similar to the argument for "except Exception". Applications that trap > KeyboardInterrupt so that they can exit cleanly without an ugly > traceback will no longer trap *all* keyboard interrupts, as they could > miss grouped ones. > See

[Python-Dev] Re: PEP 654 -- Exception Groups and except* : request for feedback for SC submission

2021-03-03 Thread Joao S. O. Bueno
Just to add +1 for Paul's concerns. Even though ExceptionGroups "are not supposed" to not leak into caller code, don't mean they "won't". Making "except Exception" catch them would make this part a non issue, and the feature looks great otherwise. On Wed, 3 Mar 2021 at 13:44, Paul Moore wrote:

[Python-Dev] Suggestion About Python Syntax

2021-03-03 Thread Anthony Farino
I love the Python scripting language, but there’s something that would make it much better. Almost every other programming language uses curly braces to enclose blocks of code and semicolons after the lines of code. That means that: 1. You can have as much white space as you want. 2.