Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:

Yes, it is a bug. __len__ can return a value different from the amount of bytes 
(in array.array, memoryview).

len(buffer) can be replaced with memoryview(buffer).nbytes, but maybe we could 
keep None and let the lower level to handle it.

----------
nosy: +serhiy.storchaka

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

Reply via email to