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
a3b84fb2
Kaydet (Commit)
a3b84fb2
authored
Eyl 02, 2012
tarafından
Stefan Krah
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #15814: Documentation: disallow hashing of multi-dimensional memoryviews.
üst
6a42bd67
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
stdtypes.rst
Doc/library/stdtypes.rst
+8
-6
No files found.
Doc/library/stdtypes.rst
Dosyayı görüntüle @
a3b84fb2
...
@@ -2376,8 +2376,9 @@ copying.
...
@@ -2376,8 +2376,9 @@ copying.
>>> data
>>> data
bytearray(b'z1spam')
bytearray(b'z1spam')
Memoryviews of hashable (read-only) types with formats 'B', 'b' or 'c'
One-dimensional memoryviews of hashable (read-only) types with formats
are also hashable. The hash is defined as ``hash(m) == hash(m.tobytes())``::
'B', 'b' or 'c' are also hashable. The hash is defined as
``hash(m) == hash(m.tobytes())``::
>>> v = memoryview(b'abcefg')
>>> v = memoryview(b'abcefg')
>>> hash(v) == hash(b'abcefg')
>>> hash(v) == hash(b'abcefg')
...
@@ -2388,12 +2389,13 @@ copying.
...
@@ -2388,12 +2389,13 @@ copying.
True
True
.. versionchanged:: 3.3
.. versionchanged:: 3.3
Memoryview object
s with formats 'B', 'b' or 'c' are now hashable.
One-dimensional memoryview
s with formats 'B', 'b' or 'c' are now hashable.
.. note::
.. note::
Hashing of memoryviews with formats other than 'B', 'b' or 'c' is
Hashing of memoryviews with formats other than 'B', 'b' or 'c' as well
possible in version 3.3.0, but will raise an error in 3.3.1 in order
as hashing of multi-dimensional memoryviews is possible in version 3.3.0,
to be compatible with the new memoryview equality definition.
but will raise an error in 3.3.1 in order to be compatible with the new
memoryview equality definition.
:class:`memoryview` has several methods:
:class:`memoryview` has several methods:
...
...
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