diff options
author | Jon Dufresne <jon.dufresne@gmail.com> | 2019-01-01 18:10:55 -0800 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2019-01-01 18:10:55 -0800 |
commit | 44f9d2efa67b58e371a7c9308f6ea00bb7e0a810 (patch) | |
tree | 4e1d947cde8035b9adafd2b2816cfba06d36e0f9 /documentation | |
parent | d5efa74e2dfde8d4ddba13e127cd85c687e6016b (diff) | |
download | six-git-44f9d2efa67b58e371a7c9308f6ea00bb7e0a810.tar.gz |
Document that binary_type is only necessary for Python 2.5 compat (#270)
As documented in the Python 2.6 release notes:
https://docs.python.org/2/whatsnew/2.6.html#pep-3112-byte-literals
> For future compatibility, Python 2.6 adds bytes as a synonym for the
> str type ...
To encourage more forward compatible code bases, inform users of this
builtin alias. This addition is similar in spirit to the note for the
b() function.
Diffstat (limited to 'documentation')
-rw-r--r-- | documentation/index.rst | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/documentation/index.rst b/documentation/index.rst index 99192a2..d0c605d 100644 --- a/documentation/index.rst +++ b/documentation/index.rst @@ -76,7 +76,9 @@ Six provides constants that may differ between Python versions. Ones ending .. data:: binary_type Type for representing binary data. This is :func:`py2:str` in Python 2 and - :func:`py3:bytes` in Python 3. + :func:`py3:bytes` in Python 3. Python 2.6 and 2.7 include ``bytes`` as a + builtin alias of ``str``, so six’s version is only necessary for Python 2.5 + compatibility. .. data:: MAXSIZE |