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
fa8dd5f4
Kaydet (Commit)
fa8dd5f4
authored
Agu 23, 2002
tarafından
Raymond Hettinger
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix markup and punctuation
üst
7c7efe90
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
libsets.tex
Doc/lib/libsets.tex
+4
-4
No files found.
Doc/lib/libsets.tex
Dosyayı görüntüle @
fa8dd5f4
...
...
@@ -33,7 +33,7 @@ abstract class useful for determining whether something is a set:
The set classes are implemented using dictionaries. As a result, sets
cannot contain mutable elements such as lists or dictionaries.
However, they can contain immutable collections such as tuples or
instances of
\class
(ImmutableSet)
. For convenience in implementing
instances of
\class
{
ImmutableSet
}
. For convenience in implementing
sets of sets, inner sets are automatically converted to immutable
form, for example,
\code
{
Set([Set(['dog'])])
}
is transformed to
\code
{
Set([ImmutableSet(['dog'])])
}
.
...
...
@@ -140,8 +140,8 @@ but not found in \class{ImmutableSet}:
\lineii
{
\var
{
s
}
.remove(
\var
{
x
}
)
}
{
Remove element
\var
{
x
}
from set
\var
{
s
}}
\lineii
{
\var
{
s
}
.discard(
\var
{
x
}
)
}
{
Removes element
\var
{
x
}
from set
\var
{
s
}
l
ike
\var
{
s
}
.remove(
\var
{
x
}
)
but does not raise
a
KeyError if
\var
{
x
}
is not in
\var
{
s
}}
{
Removes element
\var
{
x
}
from set
\var
{
s
}
. L
ike
\var
{
s
}
.remove(
\var
{
x
}
)
but does not raise KeyError if
\var
{
x
}
is not in
\var
{
s
}}
\lineii
{
\var
{
s
}
.pop()
}
{
Remove and return an element from
\var
{
s
}
; no guarantee is
made about which element is removed
}
...
...
@@ -212,6 +212,6 @@ method which returns the \class{Set} object wrapped by a new class
The two mechanisms for adding hashability are normally invisible to the
user; however, a conflict can arise in a multi-threaded environment
where one thread is updating a
S
et while another has temporarily wrapped it
where one thread is updating a
s
et while another has temporarily wrapped it
in
\class
{_
TemporarilyImmutableSet
}
. In other words, sets of mutable sets
are not thread-safe.
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