diff options
author | Alexandre Vassalotti <alexandre@peadrop.com> | 2009-12-31 03:56:09 (GMT) |
---|---|---|
committer | Alexandre Vassalotti <alexandre@peadrop.com> | 2009-12-31 03:56:09 (GMT) |
commit | eb6f8de8bf105b4d6e9e21898e76c5647a48a3c9 (patch) | |
tree | 8ea05c9c5d2af1b3c65c15a1c9c8dfbb0063576c /Doc/c-api | |
parent | b05e73d9c86872c3f0ebc7d6a157860ebc28ca2f (diff) | |
download | cpython-eb6f8de8bf105b4d6e9e21898e76c5647a48a3c9.zip cpython-eb6f8de8bf105b4d6e9e21898e76c5647a48a3c9.tar.gz cpython-eb6f8de8bf105b4d6e9e21898e76c5647a48a3c9.tar.bz2 |
Issue #6687: Moved the special-case for integers out of PyBytes_FromObject.
Diffstat (limited to 'Doc/c-api')
-rw-r--r-- | Doc/c-api/object.rst | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Doc/c-api/object.rst b/Doc/c-api/object.rst index b0700a1..a7be156 100644 --- a/Doc/c-api/object.rst +++ b/Doc/c-api/object.rst @@ -142,10 +142,11 @@ Object Protocol .. index:: builtin: bytes - Compute a bytes representation of object *o*. *NULL* is returned on failure - and a bytes object on success. This is equivalent to the Python expression - ``bytes(o)``. - + Compute a bytes representation of object *o*. *NULL* is returned on + failure and a bytes object on success. This is equivalent to the Python + expression ``bytes(o)``, when *o* is not an integer. Unlike ``bytes(o)``, + a TypeError is raised when *o* is an integer instead of a zero-initialized + bytes object. .. cfunction:: int PyObject_IsInstance(PyObject *inst, PyObject *cls) |