mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
make 'c' only accept bytes and 'C' only unicode #5499
This commit is contained in:
parent
605b9d9fe8
commit
7fe9853596
4 changed files with 15 additions and 14 deletions
|
@ -208,9 +208,13 @@ variable(s) whose address should be passed.
|
|||
Convert a Python integer to a C :ctype:`Py_ssize_t`.
|
||||
|
||||
``c`` (string of length 1) [char]
|
||||
Convert a Python character, represented as a string of length 1, to a C
|
||||
Convert a Python character, represented as a byte string of length 1, to a C
|
||||
:ctype:`char`.
|
||||
|
||||
``C`` (string of length 1) [int]
|
||||
Covert a Python character, represented as a unicode string of length 1, to a
|
||||
C :ctype:`int`.
|
||||
|
||||
``f`` (float) [float]
|
||||
Convert a Python floating point number to a C :ctype:`float`.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue