[IPython-dev] looking for advice on a custom dict-like completer
Ville M. Vainio
Fri Feb 6 13:03:47 CST 2009
On Fri, Feb 6, 2009 at 5:21 PM, Darren Dale <email@example.com> wrote:
> I submitted the h5py completer to the author of h5py, he is considering
> including it in h5py-1.1. I think it might make more sense for it to be
> distributed as a part of h5py. Do you think ipython is a better home for it?
That's true, it's always the best to ship such things in the actual
library it supports if possible.
> inclusion in ipython at some point. It was easy enough to implement the
> items completer for h5py since it only accepts strings for the keys. For a
String keys are the most important use case for a dict completer anyway.
> regular dict that can use any hashable object as a key, it should be
> possible to check the user namespace for possible completions, and then
> filter that list based on whether those objects appear as keys in the dict
> being completed. Although, I can imagine entanglements like:
Sounds a bit too involved & agressive for basic ipython usage ;-). I
can mostly envision support for strings and ints - anything that
doesn't work for those should just use normal completions that work
with all names available in the user_ns.
> package, which is nearly ready to submit to numpy-discussion for comments. I
> think I'd rather submit the dict completer to ipython-extensions for now, in
> case anyone would like to put the finishing touches on it.
Yeah, do that. It's better to get it out in the wild than let it rot
in mail attachments and personal sandboxes.
Ville M. Vainio
More information about the IPython-dev