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, terry.reedy
Date 2013-06-22.16:33:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1371918839.62.0.773637572005.issue18236@psf.upfronthosting.co.za>
In-reply-to
Content
> You stated facts: what is your proposal?

There is a bug somewhere.  We cannot simultaneously have

>>> '\N{RS}'.isspace()
True

and not accept '\N{RS}' as whitespace when parsing numbers.

I believe int(x) should be equivalent to int(x.strip()).  This is not the case now:

>>> '123\N{RS}'.strip()
'123'
>>> 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'

The reason I did not clearly state my proposal is because I am not sure whether bytes.isspace or str.isspace is correct, but I don't see any justification for having them defined differently in the ASCII range.
History
Date User Action Args
2013-06-22 16:33:59belopolskysetrecipients: + belopolsky, terry.reedy
2013-06-22 16:33:59belopolskysetmessageid: <1371918839.62.0.773637572005.issue18236@psf.upfronthosting.co.za>
2013-06-22 16:33:59belopolskylinkissue18236 messages
2013-06-22 16:33:59belopolskycreate