April 18, 2022
12:51 a.m.
On 2022-04-18 01:23, Steven D'Aprano wrote:
On Sun, Apr 17, 2022 at 08:35:06PM +0100, MRAB wrote:
You could return only the current attributes by default, but the extra attributes on demand. (Slightly strange, but backwards-compatible.) Slicing could also return what was requested, e.g. t[ : 4] would return the first 4, t[ : 5] the first 5, t[ : ] all of them, etc. (Again, strange, but backwards-compatible.)
Having len(a) and len(a[:]) be different would not be "slightly strange", it would go against 30+ years of the expectation that the empty slice makes a shallow copy of tuples and other sequences.
But apart from that? :-)