On Wednesday 28 May 2014 22:38:20 Aymeric Augustin wrote:
> The name seems confusing to me: it's called bytes_type but its main purpose
> is to exclude bytes on Python 2. Otherwise you'd just write
> isinstance(value, (bytes, six.memoryview)).
> 

I renamed it to "buffer_types"  -- because English doesn't like plurals in the 
first part of such noun-combinations, but also because this way it makes more 
sense as a concept...

> If indeed you want "bytes or bytes-like on Py 3, bytes-like but not bytes on
> Py 2" then your if clause is perfectly clear and reasonable as is.
> (Remember that bytes is an alias for str on Py 2.)
> 

...and I also threw bytearray in. https://github.com/django/django/pull/2732.

> FYI django.utils.six.memoryview is a lazy hack to get the test suite to pass
> on Python 2 and 3, I wouldn't be surprised if it's used inappropriately :-/

So, the PR can be merged without documentation ?

[No, it can't. But perhaps we can leave memoryview out of it]

Shai.

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/8104259.ajWpyWVArl%40deblack.
For more options, visit https://groups.google.com/d/optout.

Reply via email to