[Python-Dev] Re: Having Sorted Containers in stdlib?

2021-11-11 Thread Richard Levasseur
On Thu, Nov 11, 2021 at 11:22 AM Antoine Pitrou wrote: > On Thu, 11 Nov 2021 11:01:32 -0800 > Richard Levasseur wrote: > > > > In the end, it was a fun exercise, but in practice a dictionary and > > sorted() got me 90% of the way there and sufficed. Optimizing that las

[Python-Dev] Re: Having Sorted Containers in stdlib?

2021-11-11 Thread Richard Levasseur
On Thu, Nov 11, 2021 at 4:30 AM Paul Moore wrote: > On Thu, 11 Nov 2021 at 11:51, Antoine Pitrou wrote: > > > > On Wed, 10 Nov 2021 21:12:17 -0600 > > Tim Peters wrote: > > > [Bob Fang ] > > > > This is a modest proposal to consider having sorted containers > > > > (http://www.grantjenks.com/do

[Python-Dev] Re: PEP 563 and 649: The Great Compromise

2021-04-18 Thread Richard Levasseur
On Sun, Apr 18, 2021 at 10:49 AM Christopher Barker wrote: > On Sun, Apr 18, 2021 at 10:12 AM Larry Hastings > wrote: > >> On 4/18/21 9:14 AM, Richard Levasseur wrote: >> >> Alternatively: what if the "trigger" to resolve the expression to an >> obje

[Python-Dev] Re: PEP 563 and 649: The Great Compromise

2021-04-18 Thread Richard Levasseur
On Sat, Apr 17, 2021 at 8:46 PM Larry Hastings wrote: > > The heart of the debate between PEPs 563 and 649 is the question: what > should an annotation be? Should it be a string or a Python value? It > seems people who are pro-PEP 563 want it to be a string, and people who are > pro-PEP 649 wan

[Python-Dev] Re: Dusting off PEP 533?

2021-02-07 Thread Richard Levasseur
I, too, think I ran into basically the same situation as Paul: An outer async generator calls an inner async generator. The outer doesn't fully consume the inner. The inner uses an async context manager. The inner CM isn't exited when expected and resources aren't released when required/expected.

[Python-Dev] Thanks for the Dev Guide

2020-11-26 Thread Richard Levasseur
Hi everyone, I just wanted to express some appreciation for the excellent Dev Guide. I don't use git or github much, but the dev guide got me from not knowing where to start, to having a PR out for review in a couple hours. It walked me through...pretty much perfectly. Getting a CLA signed was a

[Python-Dev] PEP 622: capturing into an explicit namespace

2020-07-17 Thread Richard Levasseur
Hi Python-dev and PEP 622 Authors, I saw this idea, or something like it, posted by a couple of people, but didn't see much discussion of it, and skimming the PEP today, I didn't see a mention of it. Maybe I just missed it; my apologies if so, and a link to the relevant discussion/text would be ap

[Python-Dev] Re: PEP 622: Structural Pattern Matching

2020-06-23 Thread Richard Levasseur
Hi, I read the PEP, and a few thoughts: - I think one of the examples is some lib2to3 code? I think the matcher syntax is really great for that case (parse trees). The matcher syntax is definitely an improvement over the litany of helper functions and conditionals otherwise needed. That sai

Re: [Python-Dev] Adding test.support.safe_rmpath()

2019-02-16 Thread Richard Levasseur
On Fri, Feb 15, 2019 at 10:02 AM Zachary Ware wrote: > On Fri, Feb 15, 2019 at 11:44 AM Steve Dower > wrote: > > That said, I'd love to have a context manager that we can use to make > > this easier. Really, none of us should be having to decide "how am I > > going to use a temporary location on