mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-35054: Add yet more index entries for symbols. (GH-10121)
This commit is contained in:
parent
95f68b10d5
commit
913876d824
30 changed files with 223 additions and 190 deletions
|
@ -118,11 +118,11 @@ order, and properly aligned by skipping pad bytes if necessary (according to the
|
|||
rules used by the C compiler).
|
||||
|
||||
.. index::
|
||||
single: @; in struct format strings
|
||||
single: =; in struct format strings
|
||||
single: <; in struct format strings
|
||||
single: >; in struct format strings
|
||||
single: !; in struct format strings
|
||||
single: @ (at); in struct format strings
|
||||
single: = (equals); in struct format strings
|
||||
single: < (less); in struct format strings
|
||||
single: > (greater); in struct format strings
|
||||
single: ! (exclamation); in struct format strings
|
||||
|
||||
Alternatively, the first character of the format string can be used to indicate
|
||||
the byte order, size and alignment of the packed data, according to the
|
||||
|
@ -247,6 +247,8 @@ platform-dependent.
|
|||
Notes:
|
||||
|
||||
(1)
|
||||
.. index:: single: ? (question mark); in struct format strings
|
||||
|
||||
The ``'?'`` conversion code corresponds to the :c:type:`_Bool` type defined by
|
||||
C99. If this type is not available, it is simulated using a :c:type:`char`. In
|
||||
standard mode, it is always represented by one byte.
|
||||
|
@ -329,6 +331,8 @@ are used. Note that for :func:`unpack`, the ``'p'`` format character consumes
|
|||
``count`` bytes, but that the string returned can never contain more than 255
|
||||
bytes.
|
||||
|
||||
.. index:: single: ? (question mark); in struct format strings
|
||||
|
||||
For the ``'?'`` format character, the return value is either :const:`True` or
|
||||
:const:`False`. When packing, the truth value of the argument object is used.
|
||||
Either 0 or 1 in the native or standard bool representation will be packed, and
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue