Can a Sequence be infinite? If so, an equality test of two nonterminating sequences would be a nonterminating operation.
Do Sized and *Reversible* imply that a sequence terminates? Could __len__ return inf? Perhaps `Ordered` is a requisite condition for defining a comparator for Sequences. `OrderedSequence`? Are there unordered Sequences for which a default `__eq__` / `__cmp__` (et. al) would be wrong or inappropriate? On Fri, Jul 3, 2020, 2:08 AM Random832 <[email protected]> wrote: > On Wed, Jul 1, 2020, at 08:23, Joao S. O. Bueno wrote: > > collections.mixins.SlicedSequence that would override `__delitem__`, > > `__setitem__` and `__getitem__` and > > handle slices could pair up with the "ComparableSequence" - people > > could use these "a la carte", and > > no backwards compatibility would be hurt. > > This one raises the question of where you put the single-item accessors. > And sliced __delitem__ may be difficult to implement efficiently without > knowing the internals of the sequence type. > _______________________________________________ > 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/7HLNBVJSVA5S5EDOK7LFCQNWUMOTJXLS/ > Code of Conduct: http://python.org/psf/codeofconduct/ >
_______________________________________________ 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/EXWG43UX6KB5W6HWWBSKV73NHKB43SMC/ Code of Conduct: http://python.org/psf/codeofconduct/
