[Python-ideas] Input characters in strings by decimals (Was: Proposal for default character representation)

Mikhail V mikhailwas at gmail.com
Thu Dec 8 14:50:49 EST 2016


On 8 December 2016 at 19:45, Chris Angelico <rosuav at gmail.com> wrote:

> At the moment, you're showing
> minor advantages to decimal, and other people are showing minor
> advantages to hex; but IMO nothing yet has been strong enough to
> justify the implementation of a completely new way to do things -
> remember, people have to understand *both* in order to read code.

If the arguments in the last post are not strong enough, I think
it will be too hard to make it more strong. In my eyes
benefits in this case outweigh the downsides clearly.

And anyway, since I can use f-string now to input it,
probably one can just relax now.

And this:
   f"{65:c}{66:c}{66:c}" ,

looks actually significantly better then:
   "\d{65}\d{66}\d{67}",

And it covers the cases I was addressing with the proposal.
I am happy. +1000 to developers, even if this is an "accidental" feature .


More information about the Python-ideas mailing list