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
4103e4df
Kaydet (Commit)
4103e4df
authored
Eyl 12, 2016
tarafından
Raymond Hettinger
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #28071: Add early-out for differencing from an empty set.
üst
34b74fff
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
NEWS
Misc/NEWS
+2
-0
setobject.c
Objects/setobject.c
+8
-0
No files found.
Misc/NEWS
Dosyayı görüntüle @
4103e4df
...
@@ -33,6 +33,8 @@ Core and Builtins
...
@@ -33,6 +33,8 @@ Core and Builtins
- Issue #28046: Remove platform-specific directories from sys.path.
- Issue #28046: Remove platform-specific directories from sys.path.
- Issue #28071: Add early-out for differencing from an empty set.
- Issue #25758: Prevents zipimport from unnecessarily encoding a filename
- Issue #25758: Prevents zipimport from unnecessarily encoding a filename
(patch by Eryk Sun)
(patch by Eryk Sun)
...
...
Objects/setobject.c
Dosyayı görüntüle @
4103e4df
...
@@ -1476,6 +1476,10 @@ PyDoc_STRVAR(isdisjoint_doc,
...
@@ -1476,6 +1476,10 @@ PyDoc_STRVAR(isdisjoint_doc,
static
int
static
int
set_difference_update_internal
(
PySetObject
*
so
,
PyObject
*
other
)
set_difference_update_internal
(
PySetObject
*
so
,
PyObject
*
other
)
{
{
if
(
PySet_GET_SIZE
(
so
)
==
0
)
{
return
0
;
}
if
((
PyObject
*
)
so
==
other
)
if
((
PyObject
*
)
so
==
other
)
return
set_clear_internal
(
so
);
return
set_clear_internal
(
so
);
...
@@ -1550,6 +1554,10 @@ set_difference(PySetObject *so, PyObject *other)
...
@@ -1550,6 +1554,10 @@ set_difference(PySetObject *so, PyObject *other)
Py_ssize_t
pos
=
0
;
Py_ssize_t
pos
=
0
;
int
rv
;
int
rv
;
if
(
PySet_GET_SIZE
(
so
)
==
0
)
{
return
set_copy
(
so
);
}
if
(
!
PyAnySet_Check
(
other
)
&&
!
PyDict_CheckExact
(
other
))
{
if
(
!
PyAnySet_Check
(
other
)
&&
!
PyDict_CheckExact
(
other
))
{
return
set_copy_and_difference
(
so
,
other
);
return
set_copy_and_difference
(
so
,
other
);
}
}
...
...
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