]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Issue #1533: fix inconsistency in range function argument processing:
authorMark Dickinson <dickinsm@gmail.com>
Tue, 4 May 2010 16:18:25 +0000 (16:18 +0000)
committerMark Dickinson <dickinsm@gmail.com>
Tue, 4 May 2010 16:18:25 +0000 (16:18 +0000)
commita8d26688183bec915dbedc665ff081d2a7966c4b
treebde9dbbde332c9d4b9eb970b8e8d19082cacf209
parent4f96f5ffc6dd0b171bb14666d134af84ae307752
Issue #1533: fix inconsistency in range function argument processing:
any non-float non-integer argument is now converted to an integer (if
possible) using its __int__ method.  Previously, only small arguments
were treated this way; larger arguments (those whose __int__ was
outside the range of a C long) would produce a TypeError.

Patch by Alexander Belopolsky (with minor modifications).
Lib/test/test_builtin.py
Misc/NEWS
Python/bltinmodule.c