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
5d062d7b
Kaydet (Commit)
5d062d7b
authored
Haz 18, 2016
tarafından
Serhiy Storchaka
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #27333: Simplified testing step on 0.
üst
cfdfbb4d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
11 deletions
+4
-11
rangeobject.c
Objects/rangeobject.c
+4
-11
No files found.
Objects/rangeobject.c
Dosyayı görüntüle @
5d062d7b
...
...
@@ -29,17 +29,10 @@ validate_step(PyObject *step)
return
PyLong_FromLong
(
1
);
step
=
PyNumber_Index
(
step
);
if
(
step
)
{
Py_ssize_t
istep
=
PyNumber_AsSsize_t
(
step
,
NULL
);
if
(
istep
==
-
1
&&
PyErr_Occurred
())
{
/* Ignore OverflowError, we know the value isn't 0. */
PyErr_Clear
();
}
else
if
(
istep
==
0
)
{
PyErr_SetString
(
PyExc_ValueError
,
"range() arg 3 must not be zero"
);
Py_CLEAR
(
step
);
}
if
(
step
&&
_PyLong_Sign
(
step
)
==
0
)
{
PyErr_SetString
(
PyExc_ValueError
,
"range() arg 3 must not be zero"
);
Py_CLEAR
(
step
);
}
return
step
;
...
...
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