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. -- Steve _______________________________________________ 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/2GFHPI3ZDEIVG72GEDN53F3WMLS3JECC/ Code of Conduct: http://python.org/psf/codeofconduct/