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
4c483c4d
Kaydet (Commit)
4c483c4d
authored
Eyl 05, 2001
tarafından
Tim Peters
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Make the error msgs in our pow() implementations consistent.
üst
d893fd68
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
8 deletions
+15
-8
floatobject.c
Objects/floatobject.c
+2
-2
intobject.c
Objects/intobject.c
+3
-3
longobject.c
Objects/longobject.c
+10
-3
No files found.
Objects/floatobject.c
Dosyayı görüntüle @
4c483c4d
...
...
@@ -495,8 +495,8 @@ float_pow(PyObject *v, PyObject *w, PyObject *z)
double
iv
,
iw
,
ix
;
if
((
PyObject
*
)
z
!=
Py_None
)
{
PyErr_SetString
(
PyExc_TypeError
,
"
3rd argument to floating pow() must be None
"
);
PyErr_SetString
(
PyExc_TypeError
,
"pow() 3rd argument not "
"
allowed unless all other arguments are integers
"
);
return
NULL
;
}
...
...
Objects/intobject.c
Dosyayı görüntüle @
4c483c4d
...
...
@@ -589,8 +589,8 @@ int_pow(PyIntObject *v, PyIntObject *w, PyIntObject *z)
CONVERT_TO_LONG
(
w
,
iw
);
if
(
iw
<
0
)
{
if
((
PyObject
*
)
z
!=
Py_None
)
{
PyErr_SetString
(
PyExc_TypeError
,
"
integer pow() arg
"
"
3 must not be specified when arg 2 is < 0
"
);
PyErr_SetString
(
PyExc_TypeError
,
"
pow() 2nd argument
"
"
cannot be negative when 3rd argument specified
"
);
return
NULL
;
}
/* Return a float. This works because we know that
...
...
@@ -603,7 +603,7 @@ int_pow(PyIntObject *v, PyIntObject *w, PyIntObject *z)
CONVERT_TO_LONG
(
z
,
iz
);
if
(
iz
==
0
)
{
PyErr_SetString
(
PyExc_ValueError
,
"pow()
arg 3
cannot be 0"
);
"pow()
3rd argument
cannot be 0"
);
return
NULL
;
}
}
...
...
Objects/longobject.c
Dosyayı görüntüle @
4c483c4d
...
...
@@ -1685,15 +1685,22 @@ long_pow(PyObject *v, PyObject *w, PyObject *x)
Py_INCREF
(
Py_NotImplemented
);
return
Py_NotImplemented
;
}
if
(
c
!=
Py_None
&&
((
PyLongObject
*
)
c
)
->
ob_size
==
0
)
{
PyErr_SetString
(
PyExc_ValueError
,
"pow() 3rd argument cannot be 0"
);
z
=
NULL
;
goto
error
;
}
size_b
=
b
->
ob_size
;
if
(
size_b
<
0
)
{
Py_DECREF
(
a
);
Py_DECREF
(
b
);
Py_DECREF
(
c
);
if
(
x
!=
Py_None
)
{
PyErr_SetString
(
PyExc_TypeError
,
"
integer pow() arg
"
"
3 must not be specified when arg 2 is < 0
"
);
PyErr_SetString
(
PyExc_TypeError
,
"
pow() 2nd argument
"
"
cannot be negative when 3rd argument specified
"
);
return
NULL
;
}
/* Return a float. This works because we know that
...
...
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