Hi,

I prefer "bytes-like" than "buffer protocol". By the way, is there a
documentation in Python doc which explains "bytes-like" and maybe list most
compatible types?

I'm not sure that the term has an unique definition. In some parts of
Python, I saw explicit checks on the type: bytes or bytearray, sometimes
memoryview is accepted. The behaviour is different in C functions using
PyArg API. It probably depends if the function relies on the content (read
bytes) or on methods (ex: call .find).

Victor
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to