Stephen J. Turnbull wrote:
L[m:m+k] specifies that a list operation will take place on the k elements starting with m. As a value, it makes a new list of references to those elements.
Even that is specific to lists. There's no requirement that a RHS slice has to create new references to elements. A type can define it so that it returns a mutable view of part of the original object. This is how numpy arrays behave, for example. As syntax, slice notation simply denotes a range of elements, and it does that the same way whether it's on the LHS or RHS. -- Greg _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/HF3RYOEM3WG73IF5DACNBDVMBLD3PCBI/ Code of Conduct: http://python.org/psf/codeofconduct/