diff options
author | Mark Dickinson <dickinsm@gmail.com> | 2014-04-11 18:34:40 (GMT) |
---|---|---|
committer | Mark Dickinson <dickinsm@gmail.com> | 2014-04-11 18:34:40 (GMT) |
commit | 0c346d827d38917c4ab4b7679e223f163aec4724 (patch) | |
tree | 9806d1fa758903c8e10be3377f301926125d4ad4 /Objects | |
parent | 138185fa054b5bd5fba925c7301aff7d912df25b (diff) | |
download | cpython-0c346d827d38917c4ab4b7679e223f163aec4724.zip cpython-0c346d827d38917c4ab4b7679e223f163aec4724.tar.gz cpython-0c346d827d38917c4ab4b7679e223f163aec4724.tar.bz2 |
Issue #21193: Make (e.g.,) pow(2, -3, 5) raise ValueError rather than TypeError. Patch by Josh Rosenberg.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/longobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/longobject.c b/Objects/longobject.c index 7036c0e..b749fd3 100644 --- a/Objects/longobject.c +++ b/Objects/longobject.c @@ -3841,7 +3841,7 @@ long_pow(PyObject *v, PyObject *w, PyObject *x) if (Py_SIZE(b) < 0) { /* if exponent is negative */ if (c) { - PyErr_SetString(PyExc_TypeError, "pow() 2nd argument " + PyErr_SetString(PyExc_ValueError, "pow() 2nd argument " "cannot be negative when 3rd argument specified"); goto Error; } |