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

2016-12-08 Thread Chris Angelico
On Fri, Dec 9, 2016 at 5:37 AM, Mikhail V wrote: >> You have to show >> that decimal isn't just marginally better than hex; you have to show >> that there are situations where the value of decimal character >> literals is so great that it's worth forcing everyone to learn

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

2016-12-08 Thread Mikhail V
On 8 December 2016 at 17:52, Chris Angelico wrote: > In the first place, many people have pointed out to you that Unicode > *is* laid out best in hexadecimal. Ok if it is aligned intentionally on binary grid obviously hex numbers will show some patterns, but who argues? And

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

2016-12-08 Thread David Mertz
The Unicode Consortium reference entirely lacks decimal values in all their tables. EVERYTHING is given solely in hex. I'm sure someone somewhere had created a table with decimal values, but it's very rare. We should not change Python syntax because exactly one user prefers decimal

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

2016-12-08 Thread Random832
On Thu, Dec 8, 2016, at 11:06, Mikhail V wrote: > Some sites does not provide any code conversion, but everybody can > do it easily, also I don't have problems generating a table > programmatically. > And I hope it is clear why most people stick to hex (I never argued that > BTW), but it is mostly

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

2016-12-08 Thread Chris Angelico
On Fri, Dec 9, 2016 at 3:06 AM, Mikhail V wrote: > Results for "unicode table" in google: > > Top Result # 2: > www.utf8-chartable.de/ > > Top Result # 4: > http://www.tamasoft.co.jp/en/general-info/index.html Both of those show hex first, and decimal as an additional

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

2016-12-08 Thread Emanuel Barry
> From: Mikhail V > Sent: Thursday, December 08, 2016 11:07 AM > Subject: Re: [Python-ideas] Input characters in strings by decimals (Was: > Proposal for default character representation) > No I don't need to specify "unicode table *decimal*". > > Results for "unicode table" in google: > > Top

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

2016-12-08 Thread Mikhail V
On 8 December 2016 at 15:46, Alexandre Brault wrote: >>> Can you cite some examples of Unicode reference tables I can look up a >>> decimal number in? They seem rare; perhaps in a list as a secondary column, >>> but they're not organized/grouped decimally. Readability

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

2016-12-08 Thread Paul Moore
On 7 December 2016 at 23:52, Mikhail V wrote: > Proposal: I would want to have a possibility to input it *by decimals*: > > s = "first cyrillic letters: \{1040}\{1041}\{1042}" > or: > s = "first cyrillic letters: \(1040)\(1041)\(1042)" > > = > > This is more compact

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

2016-12-07 Thread Random832
On Wed, Dec 7, 2016, at 22:06, Mikhail V wrote: > So you were catched up from the beginning with hex, as I see ;) > I on the contrary in dark times of learning programming > (that was C) always oriented myself on decimal codes > and don't regret it now. C doesn't support decimal in string

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

2016-12-07 Thread Mikhail V
On 8 December 2016 at 03:32, Matthias welp wrote: > Dear Mikhail, > > With python3.6 you can use format strings to get very close to your > desired behaviour: > > f"{48:c}" == "0" > f"{:c}" == chr() > > It works with variables too: > > charvalue = 48 >

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

2016-12-07 Thread Mikhail V
On 8 December 2016 at 03:36, Alexander Belopolsky wrote: > > On Wed, Dec 7, 2016 at 9:07 PM, Mikhail V wrote: >> >> it somehow settled in >> peoples' minds that hex reference should be preferred, for no solid reason >> IMO. > > I may be

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

2016-12-07 Thread Alexander Belopolsky
On Wed, Dec 7, 2016 at 9:07 PM, Mikhail V wrote: > > it somehow settled in > peoples' minds that hex reference should be preferred, for no solid reason IMO. I may be showing my age, but all the facts that I remember about ASCII codes are in hex: 1. SPACE is 0x20 followed

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

2016-12-07 Thread Matthias welp
Dear Mikhail, With python3.6 you can use format strings to get very close to your desired behaviour: f"{48:c}" == "0" f"{:c}" == chr() It works with variables too: charvalue = 48 f"{charcvalue:c}" == chr(charvalue) # == "0" This is only 1 character overhead + 1 character

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

2016-12-07 Thread Mikhail V
On 8 December 2016 at 01:57, Nick Timkovich wrote: >> hex notation not so readable and anyway decimal is kind of standard way to >> represent numbers > > > Can you cite some examples of Unicode reference tables I can look up a > decimal number in? They seem rare; perhaps

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

2016-12-07 Thread Terry Reedy
On 12/7/2016 7:22 PM, Mikhail V wrote: On 8 December 2016 at 01:13, Nick Timkovich wrote: Out of curiosity, why do you prefer decimal values to refer to Unicode code points? Most references, http://unicode.org/charts/PDF/U0400.pdf (official) or

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

2016-12-07 Thread MRAB
On 2016-12-07 23:52, Mikhail V wrote: In past discussion about inputing and printing characters, I was proposing decimal notation instead of hex. Since the discussion was lost in off-topic talks, I'll try to summarise my idea better. I use ASCII only for code input (there are good reasons for

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

2016-12-07 Thread Mikhail V
On 8 December 2016 at 01:13, Nick Timkovich wrote: > Out of curiosity, why do you prefer decimal values to refer to Unicode code > points? Most references, http://unicode.org/charts/PDF/U0400.pdf (official) > or

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

2016-12-07 Thread Nick Timkovich
Out of curiosity, why do you prefer decimal values to refer to Unicode code points? Most references, http://unicode.org/charts/PDF/U0400.pdf (official) or https://en.wikibooks.org/wiki/Unicode/Character_reference/-0FFF , prefer to refer to them by hexadecimal as the planes and ranges are

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

2016-12-07 Thread Mikhail V
In past discussion about inputing and printing characters, I was proposing decimal notation instead of hex. Since the discussion was lost in off-topic talks, I'll try to summarise my idea better. I use ASCII only for code input (there are good reasons for that). Here I'll use Python 3.6, and