Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
0dafd71c
Kaydet (Commit)
0dafd71c
authored
Haz 15, 2010
tarafından
Mark Dickinson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix notes in format character table.
üst
83f4cdfb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
22 deletions
+14
-22
struct.rst
Doc/library/struct.rst
+14
-22
No files found.
Doc/library/struct.rst
Dosyayı görüntüle @
0dafd71c
...
@@ -160,38 +160,38 @@ Python values should be obvious given their types:
...
@@ -160,38 +160,38 @@ Python values should be obvious given their types:
+--------+-------------------------+--------------------+----------------+------------+
+--------+-------------------------+--------------------+----------------+------------+
| ``c`` | :ctype:`char` | bytes of length 1 | 1 | |
| ``c`` | :ctype:`char` | bytes of length 1 | 1 | |
+--------+-------------------------+--------------------+----------------+------------+
+--------+-------------------------+--------------------+----------------+------------+
| ``b`` | :ctype:`signed char` | integer | 1 | \(1)
,\(4)
|
| ``b`` | :ctype:`signed char` | integer | 1 | \(1)
|
+--------+-------------------------+--------------------+----------------+------------+
+--------+-------------------------+--------------------+----------------+------------+
| ``B`` | :ctype:`unsigned char` | integer | 1 |
\(4)
|
| ``B`` | :ctype:`unsigned char` | integer | 1 |
|
+--------+-------------------------+--------------------+----------------+------------+
+--------+-------------------------+--------------------+----------------+------------+
| ``?`` | :ctype:`_Bool` | bool | 1 | \(2) |
| ``?`` | :ctype:`_Bool` | bool | 1 | \(2) |
+--------+-------------------------+--------------------+----------------+------------+
+--------+-------------------------+--------------------+----------------+------------+
| ``h`` | :ctype:`short` | integer | 2 |
\(4)
|
| ``h`` | :ctype:`short` | integer | 2 |
|
+--------+-------------------------+--------------------+----------------+------------+
+--------+-------------------------+--------------------+----------------+------------+
| ``H`` | :ctype:`unsigned short` | integer | 2 |
\(4)
|
| ``H`` | :ctype:`unsigned short` | integer | 2 |
|
+--------+-------------------------+--------------------+----------------+------------+
+--------+-------------------------+--------------------+----------------+------------+
| ``i`` | :ctype:`int` | integer | 4 |
\(4)
|
| ``i`` | :ctype:`int` | integer | 4 |
|
+--------+-------------------------+--------------------+----------------+------------+
+--------+-------------------------+--------------------+----------------+------------+
| ``I`` | :ctype:`unsigned int` | integer | 4 |
\(4)
|
| ``I`` | :ctype:`unsigned int` | integer | 4 |
|
+--------+-------------------------+--------------------+----------------+------------+
+--------+-------------------------+--------------------+----------------+------------+
| ``l`` | :ctype:`long` | integer | 4 |
\(4)
|
| ``l`` | :ctype:`long` | integer | 4 |
|
+--------+-------------------------+--------------------+----------------+------------+
+--------+-------------------------+--------------------+----------------+------------+
| ``L`` | :ctype:`unsigned long` | integer | 4 |
\(4)
|
| ``L`` | :ctype:`unsigned long` | integer | 4 |
|
+--------+-------------------------+--------------------+----------------+------------+
+--------+-------------------------+--------------------+----------------+------------+
| ``q`` | :ctype:`long long` | integer | 8 | \(3)
, \(4)
|
| ``q`` | :ctype:`long long` | integer | 8 | \(3)
|
+--------+-------------------------+--------------------+----------------+------------+
+--------+-------------------------+--------------------+----------------+------------+
| ``Q`` | :ctype:`unsigned long | integer | 8 | \(3)
, \(4)
|
| ``Q`` | :ctype:`unsigned long | integer | 8 | \(3)
|
| | long` | | | |
| | long` | | | |
+--------+-------------------------+--------------------+----------------+------------+
+--------+-------------------------+--------------------+----------------+------------+
| ``f`` | :ctype:`float` | float | 4 | \(
5
) |
| ``f`` | :ctype:`float` | float | 4 | \(
4
) |
+--------+-------------------------+--------------------+----------------+------------+
+--------+-------------------------+--------------------+----------------+------------+
| ``d`` | :ctype:`double` | float | 8 | \(
5
) |
| ``d`` | :ctype:`double` | float | 8 | \(
4
) |
+--------+-------------------------+--------------------+----------------+------------+
+--------+-------------------------+--------------------+----------------+------------+
| ``s`` | :ctype:`char[]` | bytes | | \(1) |
| ``s`` | :ctype:`char[]` | bytes | | \(1) |
+--------+-------------------------+--------------------+----------------+------------+
+--------+-------------------------+--------------------+----------------+------------+
| ``p`` | :ctype:`char[]` | bytes | | \(1) |
| ``p`` | :ctype:`char[]` | bytes | | \(1) |
+--------+-------------------------+--------------------+----------------+------------+
+--------+-------------------------+--------------------+----------------+------------+
| ``P`` | :ctype:`void \*` | integer | | \(
6
) |
| ``P`` | :ctype:`void \*` | integer | | \(
5
) |
+--------+-------------------------+--------------------+----------------+------------+
+--------+-------------------------+--------------------+----------------+------------+
Notes:
Notes:
...
@@ -212,19 +212,11 @@ Notes:
...
@@ -212,19 +212,11 @@ Notes:
:ctype:`__int64`. They are always available in standard modes.
:ctype:`__int64`. They are always available in standard modes.
(4)
(4)
When attempting to pack a non-integer using any of the integer conversion
codes, if the non-integer has a :meth:`__index__` method then that method is
called to convert the argument to an integer before packing.
.. versionchanged:: 3.2
Use of the :meth:`__index__` method for non-integers is new in 3.2.
(5)
For the ``'f'`` and ``'d'`` conversion codes, the packed representation uses
For the ``'f'`` and ``'d'`` conversion codes, the packed representation uses
the IEEE 754 binary32 (for ``'f'``) or binary64 (for ``'d'``) format,
the IEEE 754 binary32 (for ``'f'``) or binary64 (for ``'d'``) format,
regardless of the floating-point format used by the platform.
regardless of the floating-point format used by the platform.
(
6
)
(
5
)
The ``'P'`` format character is only available for the native byte ordering
The ``'P'`` format character is only available for the native byte ordering
(selected as the default or with the ``'@'`` byte order character). The byte
(selected as the default or with the ``'@'`` byte order character). The byte
order character ``'='`` chooses to use little- or big-endian ordering based
order character ``'='`` chooses to use little- or big-endian ordering based
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment