[Python-ideas] Re: Set operations with Lists

2019-09-23 Thread Richard Musil
On Mon, Sep 23, 2019 at 12:21 AM Richard Higginbotham wrote: > I really appreciate the time and thought you have put into it (and others > here as well), and its been educational / fun for me too. One of the > concerns I have about using timeit is that it puts a lot of focus on the > exact statem

[Python-ideas] Re: Link: Bidirectional Aliasing in Python

2019-09-23 Thread Richard Musil
I had an idea for an abstract representation of the feature Nutchanon described. Let's call it aliasing and let's define it intuitively: a = 1 b alias a print(b) -> 1 b = 2 print(a) -> 2 The abstract representation would define a new construct _aliased_identifier_ (aid in short), which will behave

[Python-ideas] Re: Set operations with Lists

2019-09-23 Thread Richard Higginbotham
Tim Peters wrote: > That's not by accident - the inspiration for CPython's sort's basic > "galloping" approach was taken from this paper, which wasn't about > sorting at all: > "Adaptive Set Intersections, Unions, and Differences" (2000) > Erik D. Demaine, Alejandro López-Ortiz, J. Ian Munro > >

[Python-ideas] Re: Set operations with Lists

2019-09-23 Thread Richard Higginbotham
Andrew Barnert wrote: > On Sep 22, 2019, at 15:28, Tim Peters [email protected] wrote: > > That's not by accident - the inspiration for > > CPython's sort's basic > > "galloping" approach was taken from this paper, which wasn't about > > sorting at all: > > "Adaptive Set Intersections, Unions, a

[Python-ideas] Re: Set operations with Lists

2019-09-23 Thread Richard Higginbotham
Richard Musil wrote: > On Mon, Sep 23, 2019 at 12:21 AM Richard Higginbotham [email protected] > wrote: > > I really appreciate the time and thought you have put > > into it (and others > > here as well), and its been educational / fun for me too. One of the > > concerns I have about using timeit

[Python-ideas] Re: Set operations with Lists

2019-09-23 Thread Andrew Barnert via Python-ideas
On Sep 23, 2019, at 15:32, Richard Higginbotham wrote: >> Considering your use case however, I wonder, if you would not be better >> going with the iterator approach (as Andrew has been hinting already for >> some time in his posts). >> Richard M. > They will most likely have good performance on

[Python-ideas] Re: Set operations with Lists

2019-09-23 Thread Richard Higginbotham
Andrew Barnert wrote: > On Sep 23, 2019, at 15:32, Richard Higginbotham [email protected] wrote: > > Considering > > your use case however, I wonder, if you would not be better > > going with the iterator approach (as Andrew has been hinting already for > > some time in his posts). > > Richard M.

[Python-ideas] Re: Set operations with Lists

2019-09-23 Thread Richard Higginbotham
Hey Everybody, I do want to thank you for this souvenir. I've having it blown up and mounted on the wall. I'm going to leave some space for the benchmarks that compare my module and his with the standard set implementation. "I haven’t tested performance at all. I expect it to be slower (when

[Python-ideas] Re: Link: Bidirectional Aliasing in Python

2019-09-23 Thread Stephen J. Turnbull
Richard Musil writes: > The implementation can be an additional attribute on an identifier That's not an implementation yet. From the point of view of the Python program, an identifier is an entry in a namespace. To describe an implementation of something that acts on identifiers, you need to