[Python-ideas] Re: Means of comparing slices for intersection or containment containment and computing intersections or unions

2020-02-29 Thread Steve Jorgensen
Andrew Barnert wrote: > On Feb 29, 2020, at 10:03, Steve Jorgensen [email protected] wrote: > > In that case, I still do think that this kind of > > functionality is of enough general use to have something for it in the > > Python standard > > library, though it should probably be through the int

[Python-ideas] Re: Means of comparing slices for intersection or containment containment and computing intersections or unions

2020-02-29 Thread Andrew Barnert via Python-ideas
On Feb 29, 2020, at 10:03, Steve Jorgensen wrote: > > > In that case, I still do think that this kind of functionality is of enough > general use to have something for it in the Python standard library, though > it should probably be through the introduction of a new type (possibly named > so

[Python-ideas] Re: Means of comparing slices for intersection or containment containment and computing intersections or unions

2020-02-29 Thread Steve Jorgensen
Steve Jorgensen wrote: > Christopher Barker wrote: > > On Sat, Feb 29, 2020 at 4:37 AM Alex Hall > > [email protected] wrote: > > It seems like most of this would be very easy > > to > > implement yourself with > > the exact semantics that you prefer and find most intuitive, while other > > peo

[Python-ideas] Re: Means of comparing slices for intersection or containment containment and computing intersections or unions

2020-02-29 Thread Steve Jorgensen
Christopher Barker wrote: > On Sat, Feb 29, 2020 at 4:37 AM Alex Hall [email protected] wrote: > > It seems like most of this would be very easy to > > implement yourself with > > the exact semantics that you prefer and find most intuitive, while other > > people might have different expectatio

[Python-ideas] Re: Means of comparing slices for intersection or containment containment and computing intersections or unions

2020-02-29 Thread Christopher Barker
On Sat, Feb 29, 2020 at 4:37 AM Alex Hall wrote: > It seems like most of this would be very easy to implement yourself with > the exact semantics that you prefer and find most intuitive, while other > people might have different expectations. I have to agree here. You are proposing that a slice

[Python-ideas] Re: Means of comparing slices for intersection or containment containment and computing intersections or unions

2020-02-29 Thread Alex Hall
Which actual use cases have you had? How much better would it have been than doing it manually? It seems like most of this would be very easy to implement yourself with the exact semantics that you prefer and find most intuitive, while other people might have different expectations. Why should

[Python-ideas] Re: Means of comparing slices for intersection or containment containment and computing intersections or unions

2020-02-29 Thread Steve Jorgensen
Steve Jorgensen wrote: > I am purposefully proposing this for slices as opposed to ranges because it > is about > the bounds of the slices, not the items in synthetic sequences. Also, slices > can refer to > any type of value, not just integers. > Presumably, these operations would raise exceptio

[Python-ideas] Means of comparing slices for intersection or containment containment and computing intersections or unions

2020-02-29 Thread Steve Jorgensen
I am purposefully proposing this for slices as opposed to ranges because it is about the bounds of the slices, not the items in synthetic sequences. Also, slices can refer to any type of value, not just integers. Presumably, these operations would raise exceptions when used with slices that hav