This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eryksun
Recipients Thomas.Waldmann, eryksun, skrah, xtreak
Date 2019-01-09.00:27:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1546993678.0.0.555594897036.issue35686@roundup.psfhosted.org>
In-reply-to
Content
> Or, obviously:
> 
> with open(fn, 'rb') as fd:
>     with mmap.mmap(fd.fileno(), 0, access=mmap.ACCESS_READ) as mm:
>         with memoryview(mm)[:2] as data:
>             print(data)

Doesn't this rely on the immediate finalization of the unreferenced memoryview instance that creates the slice? It would be nice if memoryview supported alternate constructors memoryview(obj, stop) and memoryview(obj, start, stop[, step]).
History
Date User Action Args
2019-01-09 00:27:59eryksunsetrecipients: + eryksun, skrah, Thomas.Waldmann, xtreak
2019-01-09 00:27:57eryksunsetmessageid: <1546993678.0.0.555594897036.issue35686@roundup.psfhosted.org>
2019-01-09 00:27:57eryksunlinkissue35686 messages
2019-01-09 00:27:57eryksuncreate