]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
make bytes(o) respect __bytes__ #2415
authorBenjamin Peterson <benjamin@python.org>
Tue, 26 Aug 2008 16:46:47 +0000 (16:46 +0000)
committerBenjamin Peterson <benjamin@python.org>
Tue, 26 Aug 2008 16:46:47 +0000 (16:46 +0000)
commitc15a07333e712e682036d9ecb7230d25ccb1a85f
tree52eee04b10bc95047d25c9dd6b82ec9e48efeb97
parenta786b026c9992cee195b7a550bab2c70c50f874f
make bytes(o) respect __bytes__ #2415

This adds two new C-API functions: PyObject_Bytes and PyBytes_FromObject.

Reviewer: Barry
Doc/c-api/bytes.rst
Doc/c-api/object.rst
Include/bytesobject.h
Include/object.h
Lib/test/test_bytes.py
Misc/NEWS
Objects/bytesobject.c
Objects/object.c