David Wilson added the comment:

Hi Piotr,

There wasn't an obvious fix that didn't involve changing the buffer interface 
itself. There is presently ambiguity in the interface regarding the difference 
between a "read only" buffer and an "immutable" buffer, which is crucial for 
its use in this case.

Fixing the interface, followed by every buffer interface user, is a 
significantly more complicated task than simply optimizing for the most common 
case, as done here. FWIW I still think this work is worth doing, though I 
personally don't have time to approach it just now.

We could have (and possibly should) approach fixing e.g. mmap.mmap() 
hashability, possibly causing user code regressions, but even if such cases 
were fixed it still wouldn't be a enough to rely on for the optimization 
implemented here.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22003>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to