diff options
Diffstat (limited to 'Doc/library/struct.rst')
-rw-r--r-- | Doc/library/struct.rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/library/struct.rst b/Doc/library/struct.rst index ee568e6..924cb60 100644 --- a/Doc/library/struct.rst +++ b/Doc/library/struct.rst @@ -73,7 +73,7 @@ Python values should be obvious given their types: +--------+-------------------------+--------------------+-------+ | ``B`` | :ctype:`unsigned char` | integer | | +--------+-------------------------+--------------------+-------+ -| ``t`` | :ctype:`_Bool` | bool | \(1) | +| ``?`` | :ctype:`_Bool` | bool | \(1) | +--------+-------------------------+--------------------+-------+ | ``h`` | :ctype:`short` | integer | | +--------+-------------------------+--------------------+-------+ @@ -106,7 +106,7 @@ Python values should be obvious given their types: Notes: (1) - The ``'t'`` conversion code corresponds to the :ctype:`_Bool` type defined by + The ``'?'`` conversion code corresponds to the :ctype:`_Bool` type defined by C99. If this type is not available, it is simulated using a :ctype:`char`. In standard mode, it is always represented by one byte. @@ -141,7 +141,7 @@ bytes, but that the string returned can never contain more than 255 characters. -For the ``'t'`` format character, the return value is either :const:`True` or +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 any non-zero value will be True when unpacking. |