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
d5d77aac
Kaydet (Commit)
d5d77aac
authored
Tem 05, 2015
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
set items in dict displays from left to right (closes #24569)
üst
1554b178
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
6 deletions
+14
-6
test_unpack_ex.py
Lib/test/test_unpack_ex.py
+3
-0
NEWS
Misc/NEWS
+2
-0
ceval.c
Python/ceval.c
+9
-6
No files found.
Lib/test/test_unpack_ex.py
Dosyayı görüntüle @
d5d77aac
...
...
@@ -128,6 +128,9 @@ Dict display element unpacking
... for i in range(1000)) + "}"))
1000
>>> {0:1, **{0:2}, 0:3, 0:4}
{0: 4}
List comprehension element unpacking
>>> a, b, c = [0, 1, 2], 3, 4
...
...
Misc/NEWS
Dosyayı görüntüle @
d5d77aac
...
...
@@ -10,6 +10,8 @@ What's New in Python 3.5.0 beta 4?
Core and Builtins
-----------------
- Issue #24569: Make PEP 448 dictionary evaluation more consistent.
Library
-------
...
...
Python/ceval.c
Dosyayı görüntüle @
d5d77aac
...
...
@@ -2561,22 +2561,25 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
}
TARGET
(
BUILD_MAP
)
{
int
i
;
PyObject
*
map
=
_PyDict_NewPresized
((
Py_ssize_t
)
oparg
);
if
(
map
==
NULL
)
goto
error
;
while
(
--
oparg
>=
0
)
{
for
(
i
=
oparg
;
i
>
0
;
i
--
)
{
int
err
;
PyObject
*
value
=
TOP
();
PyObject
*
key
=
SECOND
();
STACKADJ
(
-
2
);
PyObject
*
key
=
PEEK
(
2
*
i
);
PyObject
*
value
=
PEEK
(
2
*
i
-
1
);
err
=
PyDict_SetItem
(
map
,
key
,
value
);
Py_DECREF
(
value
);
Py_DECREF
(
key
);
if
(
err
!=
0
)
{
Py_DECREF
(
map
);
goto
error
;
}
}
while
(
oparg
--
)
{
Py_DECREF
(
POP
());
Py_DECREF
(
POP
());
}
PUSH
(
map
);
DISPATCH
();
}
...
...
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