[Python-porting] six.buffer_types?
R. David Murray
rdmurray at bitdance.com
Mon Jun 9 15:54:48 CEST 2014
On Wed, 28 May 2014 21:01:17 +0300, Shai Berger <shai at platonix.com> wrote:
> Hi Python porters,
>
> This is my first message here; usually, I work on Django. In this work, I
> recently felt the need to have a collection of the buffer, or bytes types
> (parallel to the existing string_types) for an isinstance check. That is,
>
> if six.PY2:
> buffer_types = buffer, bytearray
> if six.PY3:
> buffer_types = bytes, bytearray, memoryview
Why do you not consider memoryview a buffer type in py2?
--David
More information about the Python-porting
mailing list