[issue26077] Make slicing of immutable structures return a view instead of a copy
Marc-Andre Lemburg
report at bugs.python.org
Mon Jan 11 03:31:30 EST 2016
Marc-Andre Lemburg added the comment:
While it's theoretically possible, there's a reason why we haven't done this in the past: we don't want to keep the possibly large original object alive when using a slice.
For buffer interface types, you can already use memoryview to get a view in case you need this.
In most other cases, it's better to work with indexes into the original object rather than views on the data.
----------
nosy: +lemburg
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26077>
_______________________________________
More information about the Python-bugs-list
mailing list