Commit 1fafc1a1 authored by Benjamin Peterson's avatar Benjamin Peterson

document __bytes__ special method (closes #13259)

parent d6ca6c2b
......@@ -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::
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment