summaryrefslogtreecommitdiffstats
path: root/Doc/reference
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2011-10-25 04:04:10 (GMT)
committerBenjamin Peterson <benjamin@python.org>2011-10-25 04:04:10 (GMT)
commit3ed559a3c7530fa6d580a7f204d162a448cbb948 (patch)
tree1f9ca4eff37507f9af341eb606282aea7b90d670 /Doc/reference
parentb4d8e912d7a9fd2f346aae5038c15f4f1f3dd411 (diff)
parent1fafc1a11f7d4799f252a40e608b0fd4d4fedb68 (diff)
downloadcpython-3ed559a3c7530fa6d580a7f204d162a448cbb948.zip
cpython-3ed559a3c7530fa6d580a7f204d162a448cbb948.tar.gz
cpython-3ed559a3c7530fa6d580a7f204d162a448cbb948.tar.bz2
merge 3.2 (#13259)
Diffstat (limited to 'Doc/reference')
-rw-r--r--Doc/reference/datamodel.rst8
1 files changed, 8 insertions, 0 deletions
diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst
index e628a02..09e168e 100644
--- a/Doc/reference/datamodel.rst
+++ b/Doc/reference/datamodel.rst
@@ -1157,6 +1157,14 @@ Basic customization
.. XXX what about subclasses of string?
+.. method:: object.__bytes__(self)
+
+ .. index:: builtin: bytes
+
+ Called by :func:`bytes` to compute a byte-string representation of an
+ object. This should return a ``bytes`` object.
+
+
.. method:: object.__format__(self, format_spec)
.. index::