summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorEthan Furman <ethan@stoneleaf.us>2015-03-11 15:17:00 (GMT)
committerEthan Furman <ethan@stoneleaf.us>2015-03-11 15:17:00 (GMT)
commit62e977f1b6d52a973304db9b0268aece99cb6c42 (patch)
tree33a3d6ed472d37bb422f325349f6bf3de0e57049 /Doc/library
parent6dd20c2d52e079161ce6c8082619fafc734efa14 (diff)
downloadcpython-62e977f1b6d52a973304db9b0268aece99cb6c42.zip
cpython-62e977f1b6d52a973304db9b0268aece99cb6c42.tar.gz
cpython-62e977f1b6d52a973304db9b0268aece99cb6c42.tar.bz2
Close issue23467: add %r compatibility to bytes and bytearray
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/stdtypes.rst8
1 files changed, 7 insertions, 1 deletions
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
index f79c416..af0a85e 100644
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -3165,7 +3165,7 @@ The conversion types are:
+------------+-----------------------------------------------------+-------+
| ``'o'`` | Signed octal value. | \(1) |
+------------+-----------------------------------------------------+-------+
-| ``'u'`` | Obsolete type -- it is identical to ``'d'``. | \(7) |
+| ``'u'`` | Obsolete type -- it is identical to ``'d'``. | \(8) |
+------------+-----------------------------------------------------+-------+
| ``'x'`` | Signed hexadecimal (lowercase). | \(2) |
+------------+-----------------------------------------------------+-------+
@@ -3200,6 +3200,9 @@ The conversion types are:
| ``'a'`` | Bytes (converts any Python object using | \(5) |
| | ``repr(obj).encode('ascii','backslashreplace)``). | |
+------------+-----------------------------------------------------+-------+
+| ``'r'`` | ``'r'`` is an alias for ``'a'`` and should only | \(7) |
+| | be used for Python2/3 code bases. | |
++------------+-----------------------------------------------------+-------+
| ``'%'`` | No argument is converted, results in a ``'%'`` | |
| | character in the result. | |
+------------+-----------------------------------------------------+-------+
@@ -3238,6 +3241,9 @@ Notes:
``b'%s'`` is deprecated, but will not be removed during the 3.x series.
(7)
+ ``b'%r'`` is deprecated, but will not be removed during the 3.x series.
+
+(8)
See :pep:`237`.
.. note::