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
ee562fc0
Kaydet (Commit)
ee562fc0
authored
Agu 15, 2003
tarafından
Raymond Hettinger
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Make sets.py compatible with Py2.2
üst
98cad481
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
1 deletion
+21
-1
sets.py
Lib/sets.py
+19
-1
NEWS
Misc/NEWS
+2
-0
No files found.
Lib/sets.py
Dosyayı görüntüle @
ee562fc0
...
@@ -54,9 +54,27 @@ what's tested is actually `z in y'.
...
@@ -54,9 +54,27 @@ what's tested is actually `z in y'.
# - Raymond Hettinger added a number of speedups and other
# - Raymond Hettinger added a number of speedups and other
# improvements.
# improvements.
from
__future__
import
generators
try
:
from
itertools
import
ifilter
,
ifilterfalse
except
ImportError
:
# Code to make the module run under Py2.2
def
ifilter
(
predicate
,
iterable
):
if
predicate
is
None
:
def
predicate
(
x
):
return
x
for
x
in
iterable
:
if
predicate
(
x
):
yield
x
def
ifilterfalse
(
predicate
,
iterable
):
if
predicate
is
None
:
def
predicate
(
x
):
return
x
for
x
in
iterable
:
if
not
predicate
(
x
):
yield
x
__all__
=
[
'BaseSet'
,
'Set'
,
'ImmutableSet'
]
__all__
=
[
'BaseSet'
,
'Set'
,
'ImmutableSet'
]
from
itertools
import
ifilter
,
ifilterfalse
class
BaseSet
(
object
):
class
BaseSet
(
object
):
"""Common base class for mutable and immutable sets."""
"""Common base class for mutable and immutable sets."""
...
...
Misc/NEWS
Dosyayı görüntüle @
ee562fc0
...
@@ -30,6 +30,8 @@ Extension modules
...
@@ -30,6 +30,8 @@ Extension modules
Library
Library
-------
-------
-
sets
.
py
now
runs
under
Py2
.2
-
random
.
seed
()
with
no
arguments
or
None
uses
time
.
time
()
as
a
default
-
random
.
seed
()
with
no
arguments
or
None
uses
time
.
time
()
as
a
default
seed
.
Modified
to
match
Py2
.2
behavior
and
use
fractional
seconds
so
seed
.
Modified
to
match
Py2
.2
behavior
and
use
fractional
seconds
so
that
successive
runs
are
more
likely
to
produce
different
sequences
.
that
successive
runs
are
more
likely
to
produce
different
sequences
.
...
...
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