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
c2b9e1a1
Kaydet (Commit)
c2b9e1a1
authored
Tem 27, 2009
tarafından
Raymond Hettinger
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue 6573: Fix set.union() for cases where self is in the argument chain.
üst
794b2a78
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
1 deletion
+8
-1
test_set.py
Lib/test/test_set.py
+4
-0
NEWS
Misc/NEWS
+3
-0
setobject.c
Objects/setobject.c
+1
-1
No files found.
Lib/test/test_set.py
Dosyayı görüntüle @
c2b9e1a1
...
@@ -81,6 +81,10 @@ class TestJointOps(unittest.TestCase):
...
@@ -81,6 +81,10 @@ class TestJointOps(unittest.TestCase):
self
.
assertEqual
(
self
.
thetype
(
'abcba'
)
.
union
(
C
(
'ef'
)),
set
(
'abcef'
))
self
.
assertEqual
(
self
.
thetype
(
'abcba'
)
.
union
(
C
(
'ef'
)),
set
(
'abcef'
))
self
.
assertEqual
(
self
.
thetype
(
'abcba'
)
.
union
(
C
(
'ef'
),
C
(
'fg'
)),
set
(
'abcefg'
))
self
.
assertEqual
(
self
.
thetype
(
'abcba'
)
.
union
(
C
(
'ef'
),
C
(
'fg'
)),
set
(
'abcefg'
))
# Issue #6573
x
=
self
.
thetype
()
self
.
assertEqual
(
x
.
union
(
set
([
1
]),
x
,
set
([
2
])),
self
.
thetype
([
1
,
2
]))
def
test_or
(
self
):
def
test_or
(
self
):
i
=
self
.
s
.
union
(
self
.
otherword
)
i
=
self
.
s
.
union
(
self
.
otherword
)
self
.
assertEqual
(
self
.
s
|
set
(
self
.
otherword
),
i
)
self
.
assertEqual
(
self
.
s
|
set
(
self
.
otherword
),
i
)
...
...
Misc/NEWS
Dosyayı görüntüle @
c2b9e1a1
...
@@ -14,6 +14,9 @@ Core and Builtins
...
@@ -14,6 +14,9 @@ Core and Builtins
- Issue #6540: Fixed crash for bytearray.translate() with invalid parameters.
- Issue #6540: Fixed crash for bytearray.translate() with invalid parameters.
- Issue #6573: set.union() stopped processing inputs if an instance of self
occurred in the argument chain.
- Issue #1616979: Added the cp720 (Arabic DOS) encoding.
- Issue #1616979: Added the cp720 (Arabic DOS) encoding.
- Issue #6070: On posix platforms import no longer copies the execute bit
- Issue #6070: On posix platforms import no longer copies the execute bit
...
...
Objects/setobject.c
Dosyayı görüntüle @
c2b9e1a1
...
@@ -1183,7 +1183,7 @@ set_union(PySetObject *so, PyObject *args)
...
@@ -1183,7 +1183,7 @@ set_union(PySetObject *so, PyObject *args)
for
(
i
=
0
;
i
<
PyTuple_GET_SIZE
(
args
)
;
i
++
)
{
for
(
i
=
0
;
i
<
PyTuple_GET_SIZE
(
args
)
;
i
++
)
{
other
=
PyTuple_GET_ITEM
(
args
,
i
);
other
=
PyTuple_GET_ITEM
(
args
,
i
);
if
((
PyObject
*
)
so
==
other
)
if
((
PyObject
*
)
so
==
other
)
return
(
PyObject
*
)
result
;
continue
;
if
(
set_update_internal
(
result
,
other
)
==
-
1
)
{
if
(
set_update_internal
(
result
,
other
)
==
-
1
)
{
Py_DECREF
(
result
);
Py_DECREF
(
result
);
return
NULL
;
return
NULL
;
...
...
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