On 8 December 2016 at 01:52, MRAB <pyt...@mrabarnett.plus.com> wrote: > On 2016-12-07 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)" >> >> ========= >>
> It's usually the case that escapes are \ followed by an ASCII-range letter > or digit; \ followed by anything else makes it a literal, even if it's a > metacharacter, e.g. " terminates a string that starts with ", but \" is a > literal ", so I don't like \{...}. > > Perl doesn't have \u... or \U..., it has \x{...} instead, and Python already > has \N{...}, so: > > s = "first cyrillic letters: \d{1040}\d{1041}\d{1042}" > > might be better, I like this and I agree this corresponds the current style better . > but I'm still -1 because hex is usual when referring to > Unicode codepoints. :-( _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/