Message 115459 - Python tracker (original) (raw)

This adds the context manager protocol to memoryview objects, as proposed on python-dev. Once the with block has finished, the underlying buffer is released and any operation on the memoryview raises a ValueError.