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
87674ec7
Kaydet (Commit)
87674ec7
authored
Agu 26, 2015
tarafından
Raymond Hettinger
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #24913: Fix overrun error in deque.index().
üst
9783e443
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
0 deletions
+10
-0
test_deque.py
Lib/test/test_deque.py
+5
-0
NEWS
Misc/NEWS
+3
-0
_collectionsmodule.c
Modules/_collectionsmodule.c
+2
-0
No files found.
Lib/test/test_deque.py
Dosyayı görüntüle @
87674ec7
...
@@ -289,6 +289,11 @@ class TestBasic(unittest.TestCase):
...
@@ -289,6 +289,11 @@ class TestBasic(unittest.TestCase):
else
:
else
:
self
.
assertEqual
(
d
.
index
(
element
,
start
,
stop
),
target
)
self
.
assertEqual
(
d
.
index
(
element
,
start
,
stop
),
target
)
def
test_insert_bug_24913
(
self
):
d
=
deque
(
'A'
*
3
)
with
self
.
assertRaises
(
ValueError
):
i
=
d
.
index
(
"Hello world"
,
0
,
4
)
def
test_insert
(
self
):
def
test_insert
(
self
):
# Test to make sure insert behaves like lists
# Test to make sure insert behaves like lists
elements
=
'ABCDEFGHI'
elements
=
'ABCDEFGHI'
...
...
Misc/NEWS
Dosyayı görüntüle @
87674ec7
...
@@ -18,6 +18,9 @@ Library
...
@@ -18,6 +18,9 @@ Library
header in part headers. Patch written by Peter Landry and reviewed by Pierre
header in part headers. Patch written by Peter Landry and reviewed by Pierre
Quentel.
Quentel.
- Issue #24913: Fix overrun error in deque.index().
Found by John Leitch and Bryce Darling.
- Issue #24774: Fix docstring in http.server.test. Patch from Chiu-Hsiang Hsu.
- Issue #24774: Fix docstring in http.server.test. Patch from Chiu-Hsiang Hsu.
- Issue #21159: Improve message in configparser.InterpolationMissingOptionError.
- Issue #21159: Improve message in configparser.InterpolationMissingOptionError.
...
...
Modules/_collectionsmodule.c
Dosyayı görüntüle @
87674ec7
...
@@ -924,6 +924,8 @@ deque_index(dequeobject *deque, PyObject *args)
...
@@ -924,6 +924,8 @@ deque_index(dequeobject *deque, PyObject *args)
if
(
stop
<
0
)
if
(
stop
<
0
)
stop
=
0
;
stop
=
0
;
}
}
if
(
stop
>
Py_SIZE
(
deque
))
stop
=
Py_SIZE
(
deque
);
for
(
i
=
0
;
i
<
stop
;
i
++
)
{
for
(
i
=
0
;
i
<
stop
;
i
++
)
{
if
(
i
>=
start
)
{
if
(
i
>=
start
)
{
...
...
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