Message380089
I think and always thought that integer domain functions should not accept non-integer arguments even with integer value. This is why I submitted numerous patches for deprecating and finally removing support of non-integer arguments in most of integer domain functions. C implemented functions which use PyArg_Parse("i") or PyLong_AsLong() for parsing arguments use now index() instead of int(). They emit a deprecation warning for non-integers in 3.8 and 3.9 and raise type error since 3.10. math.factorial() emits a warning only in 3.9.
Issue37319 (sorry, I wrote incorrect issue number in msg380085) was initially opened for 3.9, so we could convert warnings into errors in 3.10 or 3.11.
Currently randrange(1e25) can return value larger than 10**25, because int(1e25) == 10000000000000000905969664 > 10**25. |
|
Date |
User |
Action |
Args |
2020-10-31 19:03:18 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, tim.peters, rhettinger |
2020-10-31 19:03:18 | serhiy.storchaka | set | messageid: <1604170998.4.0.283167945874.issue42222@roundup.psfhosted.org> |
2020-10-31 19:03:18 | serhiy.storchaka | link | issue42222 messages |
2020-10-31 19:03:17 | serhiy.storchaka | create | |
|