Message191303
ASCII information separators, hex codes 1C through 1F are classified as space:
>>> all(c.isspace() for c in '\N{FS}\N{GS}\N{RS}\N{US}')
True
but int()/float() do not accept strings with leading or trailing separators:
>>> int('123\N{RS}')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: invalid literal for int() with base 10: '123\x1e'
This is probably because corresponding bytes values are not classified as whitespace:
>>> any(c.encode().isspace() for c in '\N{FS}\N{GS}\N{RS}\N{US}')
False |
|
Date |
User |
Action |
Args |
2013-06-17 01:06:30 | belopolsky | set | recipients:
+ belopolsky |
2013-06-17 01:06:30 | belopolsky | set | messageid: <1371431190.78.0.117337167573.issue18236@psf.upfronthosting.co.za> |
2013-06-17 01:06:30 | belopolsky | link | issue18236 messages |
2013-06-17 01:06:30 | belopolsky | create | |
|