How to enable code completion for a dictionary from method in Python?
问题 I am using Python 3.6 with PyCharm and it's kind of frustrating that there's no support for code completion for special cases of dictionary objects (with fixed key schema). Say for example I create and try to access a simple dictionary object like this: inventory = {'name': 'hammer', 'price': 2.3} inventory[''] When I position my cursor inside the quotes ' ' and hit Ctrl + Space i get code completion and the IDE correctly suggests all the possible keys in the dictionary object. That's great !