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 ivilata
Recipients ash, gward, ivilata, sampablokuper
Date 2008-06-18.08:13:44
SpamBayes Score 0.14615539
Marked as misclassified No
Message-id <1213776830.62.0.494701929889.issue2931@psf.upfronthosting.co.za>
In-reply-to
Content
What I find most bothersome is that ``optparse`` is being inconsistent
in the types of localised strings it expects. It needs Unicode strings
for snippets forming part of the help message, while it expects normal
strings in other places like ``OptionParser.error()`` --a fact which
isn't documented at all, BTW.

I've been developing a medium app lately with localised messages all
over the place using several packages in the standard library and
``optarparse``'s help messages are the only place where Unicode strings
have been required. I'm not saying that ``optparse`` shouldn't use
Unicode, but it'd be nice if it was consistent and the fact was documented.

I'm attaching a tiny script which uses ``optparse``.  Just try to change
any appearance of the ``s`` normal string to Unicode ``us`` or
vice-versa, then call the program with ``--help`` or no arguments (it
requires one) and you get a ``UnicodeError``. Thanks!
History
Date User Action Args
2008-06-18 08:13:52ivilatasetspambayes_score: 0.146155 -> 0.14615539
recipients: + ivilata, gward, ash, sampablokuper
2008-06-18 08:13:51ivilatasetspambayes_score: 0.146155 -> 0.146155
messageid: <1213776830.62.0.494701929889.issue2931@psf.upfronthosting.co.za>
2008-06-18 08:13:49ivilatalinkissue2931 messages
2008-06-18 08:13:48ivilatacreate