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 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: <snip>
OK. That does make sense to me. _______________________________________________ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/RDGKOLMVBJECFT2YO6UBD2KVVQ25WJTL/ Code of Conduct: http://python.org/psf/codeofconduct/
