This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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:30belopolskysetrecipients: + belopolsky
2013-06-17 01:06:30belopolskysetmessageid: <1371431190.78.0.117337167573.issue18236@psf.upfronthosting.co.za>
2013-06-17 01:06:30belopolskylinkissue18236 messages
2013-06-17 01:06:30belopolskycreate