[Python-Dev] Python history: origin of the arrow annotation

2021-03-05 Thread Steven D'Aprano
I was curious how and why return annotations use the arrow `->` symbol, so I went spelunking into the depths of the Python-Ideas and Python-Dev mailing lists. Much to my surprise, I couldn't find any discussion or debate about it. Eventually I tracked the discussion back to a mailing list I did

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

2021-03-05 Thread Irit Katriel via Python-Dev
Whether you have "as" or not, the value of sys.exc_info() (which is what would be attached as the context to anything you raise in the except block) is the same. So these are not two different cases -- the only difference is whether or not you have a local variable set to sys.exc_info(). On Thu, M

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

2021-03-05 Thread Irit Katriel via Python-Dev
On Thu, Mar 4, 2021 at 8:48 PM Sven R. Kunze wrote: > Hi Irit, > > makes sense. So, in case of a *mixed-type ExceptionGroup,* SystemExit > wins and forces the program to exit. > > > Could you add your reasoning to the PEP? > Good idea, I'll add "ExceptionGroup(BaseException)" as a rejected idea

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

2021-03-05 Thread Irit Katriel via Python-Dev
On Thu, Mar 4, 2021 at 11:15 PM Glenn Linderman wrote: > I like explicit, and avoiding magic. > > And this gives a compatibility story for outer loops that except: > Exception, and even for others cases that are not recoded for > ExceptionGroup handling. > It could help during the migration/mix

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

2021-03-05 Thread Mark Shannon
Hi, Thanks for taking the time to consider the PEP. Although the PEP was rejected, I still believe that the safety guarantees in PEP 651 are worth adding to Python in the future. To do that (maybe for 3.11), I need to understand your concerns better. Would you clarify a few points for me? O

[Python-Dev] Re: Integer concatenation to byte string

2021-03-05 Thread Martin (gzlist) via Python-Dev
On Tue, 2 Mar 2021 at 21:44, Memz wrote: > > foo+= 255 # Works the same as > bytesvariable+=b"ÿ" foo = b"%b%d" % (foo, 255) > foo+= a"\x255\x00" # Concatenation with itself foo = b"%b%b" % (foo, foo) See PEP461: Adding % formatting to bytes an

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

2021-03-05 Thread Antoine Pitrou
On Fri, 5 Mar 2021 15:03:59 + Mark Shannon wrote: > > There are two issues here. Portability and changes to behaviour. > > Regarding portability, I have to admit that PEP is rather vague. > That's my fault; I should have done more implementation first :( > FWIW, I have an implementation that

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

2021-03-05 Thread Baptiste Carvello
Hi, Le 05/03/2021 à 14:46, Irit Katriel via Python-Dev a écrit : > > > Whether you have "as" or not, the value of sys.exc_info() (which is what > would be attached as the context to anything you raise in the except > block) is the same. So these are not two different cases -- the only > differen

[Python-Dev] CFLAGS_NODIST and -qalias=noansi

2021-03-05 Thread Michael Felt
Dear all, After several months of absence - my first manual build surprised me by the addition of the -qalias=noansi. Before I open an issue - maybe it is not that important - I am trying to find what brought it in. It looks to be a change in behavior in configure(.ac) - starting with Python

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

2021-03-05 Thread Mark Shannon
Hi Antoine, On 05/03/2021 4:07 pm, Antoine Pitrou wrote: On Fri, 5 Mar 2021 15:03:59 + Mark Shannon wrote: There are two issues here. Portability and changes to behaviour. Regarding portability, I have to admit that PEP is rather vague. That's my fault; I should have done more implementa

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

2021-03-05 Thread Antoine Pitrou
Hi Mark, Le 05/03/2021 à 18:06, Mark Shannon a écrit : Hi Antoine, On 05/03/2021 4:07 pm, Antoine Pitrou wrote: On Fri, 5 Mar 2021 15:03:59 + Mark Shannon wrote: There are two issues here. Portability and changes to behaviour. Regarding portability, I have to admit that PEP is rather

[Python-Dev] Summary of Python tracker Issues

2021-03-05 Thread Python tracker
ACTIVITY SUMMARY (2021-02-26 - 2021-03-05) Python tracker at https://bugs.python.org/ To view or respond to any of the issues listed below, click on the issue. Do NOT respond to this message. Issues counts and deltas: open7444 (+14) closed 47702 (+66) total 55146 (+80) Open issues w

[Python-Dev] Re: [Steering-council] Re: PEP 651, Robust Stack Overflow Handling, Rejection notice

2021-03-05 Thread Brett Cannon
Speaking for myself ... On Fri, Mar 5, 2021 at 7:04 AM Mark Shannon wrote: > Hi, > > Thanks for taking the time to consider the PEP. > > Although the PEP was rejected, I still believe that the safety > guarantees in PEP 651 are worth adding to Python in the future. > > To do that (maybe for 3.11

[Python-Dev] Re: [Steering-council] Re: PEP 651, Robust Stack Overflow Handling, Rejection notice

2021-03-05 Thread Guido van Rossum
On Fri, Mar 5, 2021 at 11:11 AM Brett Cannon wrote: > Speaking for myself ... > Ditto ... On Fri, Mar 5, 2021 at 7:04 AM Mark Shannon wrote: > [...] > >> In some cases, the PEP would have improved the situation. >> >> For example: >> sys.setrecursionlimit(5000) >> def f(): >> f() >> >> Cu

[Python-Dev] Re: Python history: origin of the arrow annotation

2021-03-05 Thread Guido van Rossum
Good question. I don't think anyone has ever asked this before... Given the variants you propose, I'd say that the 3-character ones would be more effort to type without real benefits, and `=>` would at the time (and perhaps still :-) be seen as too close to `>=`. Could it be that there were alread