Completion treats square-bracketed expression as list
Brought to you by:
fabioz
When running against any expression of the form "a[0].", code completion suggests items appropriate for a list.
It should treat this as a call to the object's __getitem__ method and expand appropriately.
Examples:
(1,2,3)[0]. # shows items from dir(list); should show dir(int)
class IntDict(dict):
def __getitem__(self, k):
return int(k)
it = IntDict()
it[0]. # shows items from dir(list); should show dir(int), inferred from __getitem__
it.__getitem__('a'). #works -- shows dir(int)