Message310178
Hello,
the description for chr (from https://docs.python.org/3/library/functions.html#chr) reads as:
Return the string representing a character whose Unicode code
point is the integer i. [...] The valid range for the argument
is from 0 through 1,114,111 (0x10FFFF in base 16). ValueError
will be raised if i is outside that range.
If however a value > 0x7fffffff (or < -0x80000000) is provided, the function raises an Overflow error:
$ python3 -c 'print(chr(0x80000000))'
Traceback (most recent call last):
File "<string>", line 1, in <module>
OverflowError: signed integer is greater than maximum
This is either a documentation problem or (more like) an implementation issue. I attached a patch that fixes the issue for me. (I'm not sure however if I should call PyErr_Clear() before raising ValueError.) |
|
Date |
User |
Action |
Args |
2018-01-17 14:32:06 | ukl | set | recipients:
+ ukl |
2018-01-17 14:32:06 | ukl | set | messageid: <1516199526.4.0.467229070634.issue32582@psf.upfronthosting.co.za> |
2018-01-17 14:32:06 | ukl | link | issue32582 messages |
2018-01-17 14:32:06 | ukl | create | |
|