Take the 2-minute tour ×

I was wondering if anybody knows how to enable or implement tab completion for dictionary keys in IPython? It seems like it wouldn't be very different from functionality that already exists, like tab completion of object attributes. If I'm wrong, then I'd like to understand why

share|improve this question
Just to clarify: you mean that if d = {"apple": 1, "banana":2}, then if you type d["a"] and put the cursor after a, you'd want apple to be filled in? –  David Robinson Jul 31 '13 at 15:40
@DavidRobinson I imagine I would tye d["a and hit tab and it would complete to d["apple"] –  gggg Jul 31 '13 at 16:33
Thanks pointing at the matter. Made a report from this at bugs.launchpad.net/python-mode/+bug/1251690 –  Andreas Röhler Nov 15 '13 at 16:46

1 Answer 1

It's not built into IPython. If you want to add it, have a look at this, where someone hacked a solution:


Also, there are many short and easy ways to create objects from dictionaries, to gain the usual tab completion. If that would help you, use one of the ways described in this question:

Convert Python dict to object

share|improve this answer

Your Answer


