[Python-ideas] Proposal for default character representation

Mikhail V mikhailwas at gmail.com
Fri Oct 14 02:05:40 EDT 2016


On 13 October 2016 at 10:18, M.-A. Lemburg <mal at egenix.com> wrote:

> I suppose you did not intend everyone to have to write
> \u0000010 just to get a newline code point to avoid the
> ambiguity.

Ok there are different usage cases.
So in short without going into detail,
for example if I need to type in a unicode
string literal in ASCII editor I would find such notation
replacement beneficial for me:

u'\u0430\u0431\u0432.txt'
-->
u"{1072}{1073}{1074}.txt"

Printing could be the same I suppose.
I use Python 2.7. And printing so
with numbers instead of non-ASCII would help me see
where I have non-ASCII chars. But I think the print
behavior must be easily configurable.

Any critics on it? Besides not following the unicode consortium.
Also I would not even mind fixed width 7-digit decimals actually.
Ugly but still for me better than hex.

Mikhail


More information about the Python-ideas mailing list