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 mark.dickinson
Recipients eric.smith, mark.dickinson, mrabarnett, r.david.murray, skrah
Date 2009-12-02.11:53:49
SpamBayes Score 2.5847657e-11
Marked as misclassified No
Message-id <1259754831.15.0.746871821635.issue7327@psf.upfronthosting.co.za>
In-reply-to
Content
So when the format string has type 'str' (as in Stefan's original example) 
rather than type 'unicode', I'd say Python is doing the right thing 
already:  everything in sight, including the separators coming from 
localeconv(), has type 'str', so trying to interpret things as unicode 
seems a bit of a stretch.

If the '\xc2\xa0' from localeconv()['thousands_sep'] is to be interpreted 
as a single unicode character, shouldn't it be a unicode
string already?

However, if localeconv()['thousands_sep'] *were* to give a unicode string, 
then I suppose Decimal.__format__ should be returning a unicode result;  I 
don't think it currently does this.  (Should this be true even if the 
number being formatted is so short that no thousands separators actually 
appear in it?)
History
Date User Action Args
2009-12-02 11:53:51mark.dickinsonsetrecipients: + mark.dickinson, eric.smith, mrabarnett, r.david.murray, skrah
2009-12-02 11:53:51mark.dickinsonsetmessageid: <1259754831.15.0.746871821635.issue7327@psf.upfronthosting.co.za>
2009-12-02 11:53:49mark.dickinsonlinkissue7327 messages
2009-12-02 11:53:49mark.dickinsoncreate