[issue19321] memoryview should be a context manager

Serhiy Storchaka report at bugs.python.org
Sun Oct 20 23:00:32 CEST 2013


New submission from Serhiy Storchaka:

memoryview() acquires resource but it rarely released explicitly. I propose to made memoryview a context manager which calls the release() method in the __exit__() method. Perhaps it worth also add resource warning in the __del__() method if a memoryview was not released.

----------
components: Interpreter Core
keywords: easy
messages: 200633
nosy: serhiy.storchaka
priority: normal
severity: normal
stage: needs patch
status: open
title: memoryview should be a context manager
type: enhancement
versions: Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19321>
_______________________________________


More information about the Python-bugs-list mailing list