mirror of
https://github.com/python/cpython.git
synced 2025-11-01 10:45:30 +00:00
Issue #12380: PyArg_ParseTuple now accepts a bytearray for the 'c' format.
As a side effect, this now allows the rjust, ljust and center methods of bytes and bytearray to accept a bytearray argument. Patch by Petri Lehtinen
This commit is contained in:
parent
66d2be8986
commit
906b88fb2a
6 changed files with 53 additions and 4 deletions
|
|
@ -260,9 +260,11 @@ Numbers
|
|||
``n`` (:class:`int`) [Py_ssize_t]
|
||||
Convert a Python integer to a C :c:type:`Py_ssize_t`.
|
||||
|
||||
``c`` (:class:`bytes` of length 1) [char]
|
||||
Convert a Python byte, represented as a :class:`bytes` object of length 1,
|
||||
to a C :c:type:`char`.
|
||||
``c`` (:class:`bytes` or :class:`bytearray` of length 1) [char]
|
||||
Convert a Python byte, represented as a :class:`bytes` or
|
||||
:class:`bytearray` object of length 1, to a C :c:type:`char`.
|
||||
|
||||
.. versionchanged:: 3.3 Allow :class:`bytearray` objects
|
||||
|
||||
``C`` (:class:`str` of length 1) [int]
|
||||
Convert a Python character, represented as a :class:`str` object of
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue