mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
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:
parent
edfe72f66f
commit
1b34d2552c
6 changed files with 65 additions and 28 deletions
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue