Issue #21193: Make (e.g.,) pow(2, -3, 5) raise ValueError rather than TypeError. Patch by Josh Rosenberg.

This commit is contained in:
Mark Dickinson 2014-04-11 14:34:40 -04:00
parent 138185fa05
commit 0c346d827d
4 changed files with 6 additions and 2 deletions

View file

@ -1085,7 +1085,7 @@ class BuiltinTest(unittest.TestCase):
if isinstance(x, float) or \
isinstance(y, float) or \
isinstance(z, float):
self.assertRaises(TypeError, pow, x, y, z)
self.assertRaises(ValueError, pow, x, y, z)
else:
self.assertAlmostEqual(pow(x, y, z), 24.0)