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
43db0d6a
Kaydet (Commit)
43db0d6a
authored
Agu 21, 2002
tarafından
Raymond Hettinger
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fast size check for sub/super set tests
üst
de6d6979
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
sets.py
Lib/sets.py
+4
-0
No files found.
Lib/sets.py
Dosyayı görüntüle @
43db0d6a
...
...
@@ -239,6 +239,8 @@ class BaseSet(object):
def
issubset
(
self
,
other
):
"""Report whether another set contains this set."""
self
.
_binary_sanity_check
(
other
)
if
len
(
self
)
>
len
(
other
):
# Fast check for obvious cases
return
False
for
elt
in
self
:
if
elt
not
in
other
:
return
False
...
...
@@ -247,6 +249,8 @@ class BaseSet(object):
def
issuperset
(
self
,
other
):
"""Report whether this set contains another set."""
self
.
_binary_sanity_check
(
other
)
if
len
(
self
)
<
len
(
other
):
# Fast check for obvious cases
return
False
for
elt
in
other
:
if
elt
not
in
self
:
return
False
...
...
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