Inada Naoki <songofaca...@gmail.com> added the comment:

>
>
>
> perhaps add an if to check if the backing object is really mutable ?
> (Py_buffer.readonly)
>
>

Py_buffer.readonly doesn't mean immutable.  You can create read only buffer
from bytearray too.

Current logic uses PyBytes_CheckExact.  It is safe and enough for most
cases.

----------

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

Reply via email to