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
d8e13386
Kaydet (Commit)
d8e13386
authored
Agu 17, 2005
tarafından
Raymond Hettinger
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add shortcuts for a|a and a&a.
üst
94fedf9b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
setobject.c
Objects/setobject.c
+9
-8
No files found.
Objects/setobject.c
Dosyayı görüntüle @
d8e13386
...
@@ -1065,6 +1065,8 @@ set_union(PySetObject *so, PyObject *other)
...
@@ -1065,6 +1065,8 @@ set_union(PySetObject *so, PyObject *other)
result
=
(
PySetObject
*
)
set_copy
(
so
);
result
=
(
PySetObject
*
)
set_copy
(
so
);
if
(
result
==
NULL
)
if
(
result
==
NULL
)
return
NULL
;
return
NULL
;
if
((
PyObject
*
)
so
==
other
)
return
(
PyObject
*
)
result
;
if
(
set_update_internal
(
result
,
other
)
==
-
1
)
{
if
(
set_update_internal
(
result
,
other
)
==
-
1
)
{
Py_DECREF
(
result
);
Py_DECREF
(
result
);
return
NULL
;
return
NULL
;
...
@@ -1106,10 +1108,8 @@ set_intersection(PySetObject *so, PyObject *other)
...
@@ -1106,10 +1108,8 @@ set_intersection(PySetObject *so, PyObject *other)
PySetObject
*
result
;
PySetObject
*
result
;
PyObject
*
key
,
*
it
,
*
tmp
;
PyObject
*
key
,
*
it
,
*
tmp
;
if
((
PyObject
*
)
so
==
other
)
{
if
((
PyObject
*
)
so
==
other
)
Py_INCREF
(
other
);
return
set_copy
(
so
);
return
other
;
}
result
=
(
PySetObject
*
)
make_new_set
(
so
->
ob_type
,
NULL
);
result
=
(
PySetObject
*
)
make_new_set
(
so
->
ob_type
,
NULL
);
if
(
result
==
NULL
)
if
(
result
==
NULL
)
...
@@ -2062,13 +2062,14 @@ test_c_api(PySetObject *so)
...
@@ -2062,13 +2062,14 @@ test_c_api(PySetObject *so)
Py_DECREF
(
f
);
Py_DECREF
(
f
);
/* Raise KeyError when popping from an empty set */
/* Raise KeyError when popping from an empty set */
set_clear_internal
(
so
);
assert
(
PyNumber_InPlaceSubtract
(
ob
,
ob
)
==
ob
);
Py_DECREF
(
ob
);
assert
(
PySet_GET_SIZE
(
ob
)
==
0
);
assert
(
PySet_GET_SIZE
(
ob
)
==
0
);
assertRaises
(
PySet_Pop
(
ob
)
==
NULL
,
PyExc_KeyError
);
assertRaises
(
PySet_Pop
(
ob
)
==
NULL
,
PyExc_KeyError
);
/* Restore the set from the copy
and use the abstract
API */
/* Restore the set from the copy
using the PyNumber
API */
assert
(
Py
Object_CallMethod
(
ob
,
"update"
,
"O"
,
dup
)
==
Py_None
);
assert
(
Py
Number_InPlaceOr
(
ob
,
dup
)
==
ob
);
Py_DECREF
(
Py_None
);
Py_DECREF
(
ob
);
/* Verify constructors accept NULL arguments */
/* Verify constructors accept NULL arguments */
f
=
PySet_New
(
NULL
);
f
=
PySet_New
(
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