diff options
author | Georg Brandl <georg@python.org> | 2014-10-28 20:38:54 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2014-10-28 20:38:54 (GMT) |
commit | a3e80deac1474f86bb01b024c276e8a6e6d78901 (patch) | |
tree | 0ee23435567e750da3e22ac420fe6d5d05427687 /Doc/howto | |
parent | 3fab2085b7e552e68e6c6ddd1aa2502d041f8a6c (diff) | |
parent | 89c558da00dbf4237d9369764213fa5d6b0b8a50 (diff) | |
download | cpython-a3e80deac1474f86bb01b024c276e8a6e6d78901.zip cpython-a3e80deac1474f86bb01b024c276e8a6e6d78901.tar.gz cpython-a3e80deac1474f86bb01b024c276e8a6e6d78901.tar.bz2 |
merge with 3.4
Diffstat (limited to 'Doc/howto')
-rw-r--r-- | Doc/howto/cporting.rst | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Doc/howto/cporting.rst b/Doc/howto/cporting.rst index 1ad77d6..6ebcc41 100644 --- a/Doc/howto/cporting.rst +++ b/Doc/howto/cporting.rst @@ -43,10 +43,9 @@ separating others. str/unicode Unification ----------------------- - -Python 3's :func:`str` (``PyString_*`` functions in C) type is equivalent to -Python 2's :func:`unicode` (``PyUnicode_*``). The old 8-bit string type has -become :func:`bytes`. Python 2.6 and later provide a compatibility header, +Python 3's :func:`str` type is equivalent to Python 2's :func:`unicode`; the C +functions are called ``PyUnicode_*`` for both. The old 8-bit string type has become +:func:`bytes`, with C functions called ``PyBytes_*``. Python 2.6 and later provide a compatibility header, :file:`bytesobject.h`, mapping ``PyBytes`` names to ``PyString`` ones. For best compatibility with Python 3, :c:type:`PyUnicode` should be used for textual data and :c:type:`PyBytes` for binary data. It's also important to remember that |