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
90bf5f11
Kaydet (Commit)
90bf5f11
authored
Eki 25, 2011
tarafından
Ezio Melotti
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Remove mention of narrow/wide builds and update array doc, add a test.
üst
199786bd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
12 deletions
+6
-12
array.rst
Doc/library/array.rst
+3
-7
test_array.py
Lib/test/test_array.py
+2
-1
arraymodule.c
Modules/arraymodule.c
+1
-4
No files found.
Doc/library/array.rst
Dosyayı görüntüle @
90bf5f11
...
...
@@ -21,7 +21,7 @@ defined:
+-----------+--------------------+-------------------+-----------------------+-------+
| ``'B'`` | unsigned char | int | 1 | |
+-----------+--------------------+-------------------+-----------------------+-------+
| ``'u'`` | Py_U
NICODE | Unicode character | 2 | \(1)
|
| ``'u'`` | Py_U
CS4 | Unicode character | 4 |
|
+-----------+--------------------+-------------------+-----------------------+-------+
| ``'h'`` | signed short | int | 2 | |
+-----------+--------------------+-------------------+-----------------------+-------+
...
...
@@ -35,9 +35,9 @@ defined:
+-----------+--------------------+-------------------+-----------------------+-------+
| ``'L'`` | unsigned long | int | 4 | |
+-----------+--------------------+-------------------+-----------------------+-------+
| ``'q'`` | signed long long | int | 8 | \(
2
) |
| ``'q'`` | signed long long | int | 8 | \(
1
) |
+-----------+--------------------+-------------------+-----------------------+-------+
| ``'Q'`` | unsigned long long | int | 8 | \(
2
) |
| ``'Q'`` | unsigned long long | int | 8 | \(
1
) |
+-----------+--------------------+-------------------+-----------------------+-------+
| ``'f'`` | float | float | 4 | |
+-----------+--------------------+-------------------+-----------------------+-------+
...
...
@@ -47,10 +47,6 @@ defined:
Notes:
(1)
The ``'u'`` type code corresponds to Python's unicode character. On narrow
Unicode builds this is 2-bytes, on wide builds this is 4-bytes.
(2)
The ``'q'`` and ``'Q'`` type codes are available only if
the platform C compiler used to build Python supports C :c:type:`long long`,
or, on Windows, :c:type:`__int64`.
...
...
Lib/test/test_array.py
Dosyayı görüntüle @
90bf5f11
...
...
@@ -1015,7 +1015,7 @@ class UnicodeTest(StringTest):
smallerexample
=
'
\x01\u263a\x00\ufefe
'
biggerexample
=
'
\x01\u263a\x01\ufeff
'
outside
=
str
(
'
\x33
'
)
minitemsize
=
2
minitemsize
=
4
def
test_unicode
(
self
):
self
.
assertRaises
(
TypeError
,
array
.
array
,
'b'
,
'foo'
)
...
...
@@ -1027,6 +1027,7 @@ class UnicodeTest(StringTest):
a
.
fromunicode
(
'
\x11
abc
\xff\u1234
'
)
s
=
a
.
tounicode
()
self
.
assertEqual
(
s
,
'
\xa0\xc2\u1234
\x11
abc
\xff\u1234
'
)
self
.
assertEqual
(
a
.
itemsize
,
4
)
s
=
'
\x00
="
\'
a
\\
b
\x80\xff\u0000\u0001\u1234
'
a
=
array
.
array
(
'u'
,
s
)
...
...
Modules/arraymodule.c
Dosyayı görüntüle @
90bf5f11
...
...
@@ -2593,7 +2593,7 @@ is a single character. The following type codes are defined:\n\
Type code C Type Minimum size in bytes
\n
\
'b' signed integer 1
\n
\
'B' unsigned integer 1
\n
\
'u' Unicode character
2 (see note)
\n
\
'u' Unicode character
4
\n
\
'h' signed integer 2
\n
\
'H' unsigned integer 2
\n
\
'i' signed integer 2
\n
\
...
...
@@ -2605,9 +2605,6 @@ is a single character. The following type codes are defined:\n\
'f' floating point 4
\n
\
'd' floating point 8
\n
\
\n
\
NOTE: The 'u' type code corresponds to Python's unicode character. On
\n
\
narrow builds this is 2-bytes on wide builds this is 4-bytes.
\n
\
\n
\
NOTE: The 'q' and 'Q' type codes are only available if the platform
\n
\
C compiler used to build Python supports 'long long', or, on Windows,
\n
\
'__int64'.
\n
\
...
...
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