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
cab5b945
Kaydet (Commit)
cab5b945
authored
Tem 22, 2004
tarafından
Raymond Hettinger
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
SF bug #995983 and #995987: Documentation nits.
üst
7bd33c5e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
libstdtypes.tex
Doc/lib/libstdtypes.tex
+7
-5
No files found.
Doc/lib/libstdtypes.tex
Dosyayı görüntüle @
cab5b945
...
...
@@ -1185,6 +1185,10 @@ subset of the second set (is a subset, but is not equal).
A set is greater than another set if and only if the first set is a proper
superset of the second set (is a superset, but is not equal).
Instanceas of
\class
{
set
}
are compared to instances of
\class
{
frozenset
}
based
on their members. For example,
\samp
{
set('abc') == frozenset('abc')
}
returns
\code
{
True
}
.
The subset and equality comparisons do not generalize to a complete
ordering function. For example, any two disjoint sets are not equal and
are not subsets of each other, so
\emph
{
all
}
of the following return
...
...
@@ -1195,11 +1199,9 @@ Accordingly, sets do not implement the \method{__cmp__} method.
Since sets only define partial ordering (subset relationships), the output
of the
\method
{
list.sort()
}
method is undefined for lists of sets.
For convenience in implementing sets of sets, the
\method
{__
contains
__
()
}
,
\method
{
remove()
}
, and
\method
{
discard()
}
methods automatically match
instances of the
\class
{
set
}
class their
\class
{
frozenset
}
counterparts
inside a set. For example,
\code
{
set('abc') in set([frozenset('abc')])
}
returns
\code
{
True
}
.
Binary operations that mix
\class
{
set
}
instances with
\class
{
frozenset
}
return the type of the first operand. For example:
\samp
{
frozenset('ab') | set('bc')
}
returns an instance of
\class
{
frozenset
}
.
The following table lists operations available for
\class
{
set
}
that do not apply to immutable instances of
\class
{
frozenset
}
:
...
...
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