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
0f04bc79
Kaydet (Commit)
0f04bc79
authored
Mar 04, 2016
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
merge 3.5 (closes #26478)
üst
998f7d71
cfc2a1fc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
5 deletions
+11
-5
test_dictviews.py
Lib/test/test_dictviews.py
+4
-0
NEWS
Misc/NEWS
+3
-0
dictobject.c
Objects/dictobject.c
+4
-5
No files found.
Lib/test/test_dictviews.py
Dosyayı görüntüle @
0f04bc79
...
...
@@ -97,6 +97,7 @@ class DictSetTest(unittest.TestCase):
self
.
assertEqual
(
d1
.
keys
()
&
set
(
d1
.
keys
()),
{
'a'
,
'b'
})
self
.
assertEqual
(
d1
.
keys
()
&
set
(
d2
.
keys
()),
{
'b'
})
self
.
assertEqual
(
d1
.
keys
()
&
set
(
d3
.
keys
()),
set
())
self
.
assertEqual
(
d1
.
keys
()
&
tuple
(
d1
.
keys
()),
{
'a'
,
'b'
})
self
.
assertEqual
(
d1
.
keys
()
|
d1
.
keys
(),
{
'a'
,
'b'
})
self
.
assertEqual
(
d1
.
keys
()
|
d2
.
keys
(),
{
'a'
,
'b'
,
'c'
})
...
...
@@ -105,6 +106,7 @@ class DictSetTest(unittest.TestCase):
self
.
assertEqual
(
d1
.
keys
()
|
set
(
d2
.
keys
()),
{
'a'
,
'b'
,
'c'
})
self
.
assertEqual
(
d1
.
keys
()
|
set
(
d3
.
keys
()),
{
'a'
,
'b'
,
'd'
,
'e'
})
self
.
assertEqual
(
d1
.
keys
()
|
(
1
,
2
),
{
'a'
,
'b'
,
1
,
2
})
self
.
assertEqual
(
d1
.
keys
()
^
d1
.
keys
(),
set
())
self
.
assertEqual
(
d1
.
keys
()
^
d2
.
keys
(),
{
'a'
,
'c'
})
...
...
@@ -113,6 +115,7 @@ class DictSetTest(unittest.TestCase):
self
.
assertEqual
(
d1
.
keys
()
^
set
(
d2
.
keys
()),
{
'a'
,
'c'
})
self
.
assertEqual
(
d1
.
keys
()
^
set
(
d3
.
keys
()),
{
'a'
,
'b'
,
'd'
,
'e'
})
self
.
assertEqual
(
d1
.
keys
()
^
tuple
(
d2
.
keys
()),
{
'a'
,
'c'
})
self
.
assertEqual
(
d1
.
keys
()
-
d1
.
keys
(),
set
())
self
.
assertEqual
(
d1
.
keys
()
-
d2
.
keys
(),
{
'a'
})
...
...
@@ -120,6 +123,7 @@ class DictSetTest(unittest.TestCase):
self
.
assertEqual
(
d1
.
keys
()
-
set
(
d1
.
keys
()),
set
())
self
.
assertEqual
(
d1
.
keys
()
-
set
(
d2
.
keys
()),
{
'a'
})
self
.
assertEqual
(
d1
.
keys
()
-
set
(
d3
.
keys
()),
{
'a'
,
'b'
})
self
.
assertEqual
(
d1
.
keys
()
-
(
0
,
1
),
{
'a'
,
'b'
})
self
.
assertFalse
(
d1
.
keys
()
.
isdisjoint
(
d1
.
keys
()))
self
.
assertFalse
(
d1
.
keys
()
.
isdisjoint
(
d2
.
keys
()))
...
...
Misc/NEWS
Dosyayı görüntüle @
0f04bc79
...
...
@@ -181,6 +181,9 @@ Core and Builtins
converted
to
normal
strings
at
run
time
.
Given
x
=
3
,
then
f
'value={x}'
==
'value=3'
.
Patch
by
Eric
V
.
Smith
.
-
Issue
#
26478
:
Fix
semantic
bugs
when
using
binary
operators
with
dictionary
views
and
tuples
.
-
Issue
#
26171
:
Fix
possible
integer
overflow
and
heap
corruption
in
zipimporter
.
get_data
().
...
...
Objects/dictobject.c
Dosyayı görüntüle @
0f04bc79
...
...
@@ -3451,7 +3451,7 @@ dictviews_sub(PyObject* self, PyObject *other)
if
(
result
==
NULL
)
return
NULL
;
tmp
=
_PyObject_CallMethodId
(
result
,
&
PyId_difference_update
,
"O"
,
other
);
tmp
=
_PyObject_CallMethodId
ObjArgs
(
result
,
&
PyId_difference_update
,
other
,
NULL
);
if
(
tmp
==
NULL
)
{
Py_DECREF
(
result
);
return
NULL
;
...
...
@@ -3471,7 +3471,7 @@ _PyDictView_Intersect(PyObject* self, PyObject *other)
if
(
result
==
NULL
)
return
NULL
;
tmp
=
_PyObject_CallMethodId
(
result
,
&
PyId_intersection_update
,
"O"
,
other
);
tmp
=
_PyObject_CallMethodId
ObjArgs
(
result
,
&
PyId_intersection_update
,
other
,
NULL
);
if
(
tmp
==
NULL
)
{
Py_DECREF
(
result
);
return
NULL
;
...
...
@@ -3491,7 +3491,7 @@ dictviews_or(PyObject* self, PyObject *other)
if
(
result
==
NULL
)
return
NULL
;
tmp
=
_PyObject_CallMethodId
(
result
,
&
PyId_update
,
"O"
,
other
);
tmp
=
_PyObject_CallMethodId
ObjArgs
(
result
,
&
PyId_update
,
other
,
NULL
);
if
(
tmp
==
NULL
)
{
Py_DECREF
(
result
);
return
NULL
;
...
...
@@ -3511,8 +3511,7 @@ dictviews_xor(PyObject* self, PyObject *other)
if
(
result
==
NULL
)
return
NULL
;
tmp
=
_PyObject_CallMethodId
(
result
,
&
PyId_symmetric_difference_update
,
"O"
,
other
);
tmp
=
_PyObject_CallMethodIdObjArgs
(
result
,
&
PyId_symmetric_difference_update
,
other
,
NULL
);
if
(
tmp
==
NULL
)
{
Py_DECREF
(
result
);
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