Message191303
| Author | belopolsky |
|---|---|
| Recipients | belopolsky |
| Date | 2013-06-17.01:06:30 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1371431190.78.0.117337167573.issue18236@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
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 |
|
| History | |||
|---|---|---|---|
| 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 | |