Christopher Barker wrote:
On Sat, Feb 29, 2020 at 4:37 AM Alex Hall email@example.com 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 object be treated as a
general purpose interval, but that is not, in fact what they are. This is made clear by: " Presumably, these operations would raise exceptions when used with slices that have step values other than None." and also: "whereas a slice represents a possibly continuous range of any kind of value to which magnitude is applicable." well, sort of. Given the implementation and duck typing, I suppose that's true. But in fact, slices were designed for, and are (at least mostly) used to, well, slice sequences, which are always integer indexes, and hav semantics specific to that use case:
OK. That does make sense to me.