Message220626
AutoComplete isn't doing hidden checks. My concern is that auto-completion happens automatically and the parsing is done synchronously, so if the parsing takes a significant amount of time it can cause a delay long enough to be noticeable by users. We should also consider the IDLE is being used on some relatively weak computers, such as Raspberry Pi. I have one for testing if needed!
Your suggestion of jumping backwards several characters at a time and calling isidentifier() seems problematic. For example, how would it deal with something like "2fast2furious"? Recognizing "fast2furious" as the identifier candidate is incorrect, but that's what we'd get with a straightforward implementation of your suggestion. I can't think of a way to get this right without be able to check if each character is valid for identifiers.
I still think the category(normalize(char)[0]) in {...} approach could be just fine. I'd really like to get feedback from an expert on unicode. The experts index lists three people as experts on unicodedata; I've added them to the nosy for this issue.
Once we have an identifier candidate, the code currently just checks that the first char is valid and that the identifier isn't a keyword. We probably should use str.isidentifier() instead of just checking the first character. |
|
Date |
User |
Action |
Args |
2014-06-15 11:03:05 | taleinat | set | recipients:
+ taleinat, lemburg, loewis, terry.reedy, ezio.melotti |
2014-06-15 11:03:05 | taleinat | set | messageid: <1402830185.61.0.872830760434.issue21765@psf.upfronthosting.co.za> |
2014-06-15 11:03:05 | taleinat | link | issue21765 messages |
2014-06-15 11:03:05 | taleinat | create | |
|