On Wed, 18 Mar 2015 10:29:53 +1100, Steven D'Aprano wrote: > Speaking of tab completion, would anyone be interested in being able > to auto-complete \N{...} unicode character names? I'm considering that > as an enhancement to my tabhistory module.
Only if it's fuzzy. One use case is that "opening curly quote" character, except that I don't remember that it's actually a "left double quotation mark." Once I type "open," or "quot," no amount of ordinary left-to-right / startswith completion will help me. And if I have to look it up somewhere, then I can probably just copy/paste an actual character or a U+XXXX code once I find it. > Python supports \N{...} backslash escapes in Unicode strings, so we > can write things like: > > py> print(u"\N{CYRILLIC CAPITAL LETTER ZE WITH DESCENDER}") > Ҙ Or I can just enter Ҙ directly using my OS' preferred input method(s), which is in all likelihood easier and more familiar and comfortable¹ for someone who has a need for a Ҙ in the first place. (I am not one of those people; I just copied and pasted the Ҙ that you provided.) > There are currently somewhere in the vicinity of 110 thousand such > names. I think you just made my point about the completion being fuzzy. ;-) Dan ¹ Okay, so that's just an *opinion*. -- https://mail.python.org/mailman/listinfo/python-list