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
2a7d596f
Kaydet (Commit)
2a7d596f
authored
Haz 26, 2019
tarafından
Brandt Bucher
Kaydeden (comit)
Serhiy Storchaka
Haz 26, 2019
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
bpo-37417: Fix error handling in bytearray.extend. (GH-14407)
üst
5150d327
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
0 deletions
+12
-0
test_builtin.py
Lib/test/test_builtin.py
+5
-0
2019-06-26-18-41-00.bpo-37417.VsZeHL.rst
...ore and Builtins/2019-06-26-18-41-00.bpo-37417.VsZeHL.rst
+3
-0
bytearrayobject.c
Objects/bytearrayobject.c
+4
-0
No files found.
Lib/test/test_builtin.py
Dosyayı görüntüle @
2a7d596f
...
...
@@ -1592,6 +1592,11 @@ class BuiltinTest(unittest.TestCase):
self
.
assertRaises
(
ValueError
,
x
.
translate
,
b
"1"
,
1
)
self
.
assertRaises
(
TypeError
,
x
.
translate
,
b
"1"
*
256
,
1
)
def
test_bytearray_extend_error
(
self
):
array
=
bytearray
()
bad_iter
=
map
(
int
,
"X"
)
self
.
assertRaises
(
ValueError
,
array
.
extend
,
bad_iter
)
def
test_construct_singletons
(
self
):
for
const
in
None
,
Ellipsis
,
NotImplemented
:
tp
=
type
(
const
)
...
...
Misc/NEWS.d/next/Core and Builtins/2019-06-26-18-41-00.bpo-37417.VsZeHL.rst
0 → 100644
Dosyayı görüntüle @
2a7d596f
:meth:`bytearray.extend` now correctly handles errors that arise during iteration.
Patch by Brandt Bucher.
\ No newline at end of file
Objects/bytearrayobject.c
Dosyayı görüntüle @
2a7d596f
...
...
@@ -1698,6 +1698,10 @@ bytearray_extend(PyByteArrayObject *self, PyObject *iterable_of_ints)
}
Py_DECREF
(
bytearray_obj
);
if
(
PyErr_Occurred
())
{
return
NULL
;
}
Py_RETURN_NONE
;
}
...
...
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