Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b4d8e91 + 1fafc1a commit 3ed559aCopy full SHA for 3ed559a
1 file changed
Doc/reference/datamodel.rst
@@ -1157,6 +1157,14 @@ Basic customization
1157
.. XXX what about subclasses of string?
1158
1159
1160
+.. method:: object.__bytes__(self)
1161
+
1162
+ .. index:: builtin: bytes
1163
1164
+ Called by :func:`bytes` to compute a byte-string representation of an
1165
+ object. This should return a ``bytes`` object.
1166
1167
1168
.. method:: object.__format__(self, format_spec)
1169
1170
.. index::
0 commit comments