mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
Issue #6687: Moved the special-case for integers out of PyBytes_FromObject.
This commit is contained in:
parent
b05e73d9c8
commit
eb6f8de8bf
3 changed files with 33 additions and 25 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue