Quantcast
Channel: Make a memoryview read-only in Python pre-3.8 - Stack Overflow
Browsing latest articles
Browse All 2 View Live

Answer by blhsing for Make a memoryview read-only in Python pre-3.8

You can create a read-only wrapper/proxy class for memoryview to deny setter and deleter calls. For getter calls, make sure to wrap the sliced view in another instance of the read-only proxy class if a...

View Article



Make a memoryview read-only in Python pre-3.8

Python 3.8 added the memoryview.toreadonly() method. But is there a way to make a read-only memoryview in previous version of python -- specifically Python 3.5 and 3.3?For a little bit more background,...

View Article
Browsing latest articles
Browse All 2 View Live




Latest Images