Martin Panter added the comment:

Some thoughts and observations from trying this patch out:

* It supports single and double quotes, but triple-quoted strings get trashed
* It supports Python 2’s u". . ." syntax, but not r". . .", b". . .", etc
* It supports integer keys, but not indexes of lists
* It does not seem to support multi-level dictionaries (e.g. config parser): 
d[key1][key2]
* Control codes in strings are awkward
* Escape codes in strings don’t seem to be parsed or generated properly
* The module doc string would sort of become out of date: “indexing operations 
are *not* evaluated”

It works for custom dictionaries, so it can invoke custom code to list the 
keys. Maybe this is okay; I wouldn’t expect listing an object’s keys to have a 
serious effect. But you could add a Mapping (and Sequence) ABC check in case 
the object implements keys() but is not really a dictionary.

It would be nice for this to work by default, because Tab completion is now 
enabled by default. But I worry if changing the default completer delimiters 
globally will be a compatibility problem.

There is a mega ugly regular expression in the patch. Is there another way to 
do whatever it is doing? Failing that, you could add comments, group names, etc 
to make it more understandable.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10351>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to