Issue #5080: turn the DeprecationWarning from float arguments passed

to integer PyArg_Parse* format codes into a TypeError.  Add a
DeprecationWarning for floats passed with the 'L' format code, which
didn't previously have a warning.
This commit is contained in:
Mark Dickinson 2010-01-01 17:27:30 +00:00
parent edfe72f66f
commit 1b34d2552c
6 changed files with 65 additions and 28 deletions

View file

@ -81,7 +81,7 @@ class XrangeTest(unittest.TestCase):
self.assertRaises(TypeError, xrange, 1, 2, 3, 4)
self.assertRaises(ValueError, xrange, 1, 2, 0)
self.assertRaises(OverflowError, xrange, 1e100, 1e101, 1e101)
self.assertRaises(OverflowError, xrange, 10**100, 10**101, 10**101)
self.assertRaises(TypeError, xrange, 0, "spam")
self.assertRaises(TypeError, xrange, 0, 42, "spam")