Author skrah
Recipients benjamin.peterson, eric.smith, ezio.melotti, loewis, mark.dickinson, skrah, vstinner
Date 2012-01-03.23:44:15
SpamBayes Score 2.01805e-06
Marked as misclassified No
Message-id <1325634256.66.0.419765190817.issue13706@psf.upfronthosting.co.za>
In-reply-to
Content
Actually the issue is not restricted to numeric formatting. It's not
possible to pad a Unicode string with a non-ascii whitespace:

>>> format("abcd", "\u2007<7")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: fill character too large



I'd be more than happy to restrict all numerical I/O operations to
ASCII. This includes input strings for int(), float(), Decimal().


It does break backwards compatibility though and the situation
for string formatting above seems odd to me. It is worse when
the rejected fill character is already present in the string:


>>> format("\u2007abcd", "\u2007<7")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: fill character too large
History
Date User Action Args
2012-01-03 23:44:16skrahsetrecipients: + skrah, loewis, mark.dickinson, vstinner, eric.smith, benjamin.peterson, ezio.melotti
2012-01-03 23:44:16skrahsetmessageid: <1325634256.66.0.419765190817.issue13706@psf.upfronthosting.co.za>
2012-01-03 23:44:16skrahlinkissue13706 messages
2012-01-03 23:44:15skrahcreate