Skip to content

autocomplete could work for items in lists, tuples, etc #37

@ikanobori

Description

@ikanobori

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...


Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions