(original) (raw)

changeset: 73112:4128de054937 parent: 73098:9d8a14a550a3 parent: 73111:199d9e3fe0ce user: Benjamin Peterson benjamin@python.org date: Tue Oct 25 00:04:10 2011 -0400 files: Doc/reference/datamodel.rst description: merge 3.2 (#13259) diff -r 9d8a14a550a3 -r 4128de054937 Doc/reference/datamodel.rst --- a/Doc/reference/datamodel.rst Mon Oct 24 08:52:30 2011 -0400 +++ b/Doc/reference/datamodel.rst Tue Oct 25 00:04:10 2011 -0400 @@ -1157,6 +1157,14 @@ .. 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:: /benjamin@python.org