In the following case (where -!- is the cursor position):
l = ['foo', 'bar', 'baz']
l[0].-!-
It won't autocomplete with string methods.
This makes sense in the general case, because l[0] could be a method call, but if type(l) is list, bpython could autocomplete according with the type of l[0] without any side effects. The same could be done for tuples, and dicts.
It may be reasonably safe to extend this to subclasses of list, tuple and dicts too. This way it would work for nametuples, defaultdicts, etc...
In the following case (where -!- is the cursor position):
It won't autocomplete with string methods.
This makes sense in the general case, because l[0] could be a method call, but if type(l) is list, bpython could autocomplete according with the type of l[0] without any side effects. The same could be done for tuples, and dicts.
It may be reasonably safe to extend this to subclasses of list, tuple and dicts too. This way it would work for nametuples, defaultdicts, etc...