[Python-ideas] Proposal for default character representation
Greg Ewing
greg.ewing at canterbury.ac.nz
Thu Oct 13 04:55:19 EDT 2016
Mikhail V wrote:
> Ok, but if I write a string filtering in Python for example then
> obviously I use decimal everywhere to compare index ranges, etc.
> so what is the use for me of that label? Just redundant
> conversions back and forth.
I'm not sure what you mean by that. If by "index ranges"
you're talking about the numbers you use to index into
the string, they have nothing to do with character codes,
so you can write them in whatever base is most convenient
for you.
If you have occasion to write a literal representing a
character code, there's nothing to stop you writing it
in hex to match the way it's shown in a repr(), or in
published Unicode tables, etc.
I don't see a need for any conversions back and forth.
--
Greg
More information about the Python-ideas
mailing list