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? :-)
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at
https://mail.python.org/archives/list/python-dev@python.org/message/7U7E7E5QOBOUVOC4HUQ525FWA4X3WFKM/
Code of Conduct: http://python.org/psf/codeofconduct/