Infer types that use similar names (via Reddit) #80

davidhalter opened this Issue Dec 11, 2012 · 1 comment


None yet

1 participant


If completions fails we could use a different approach to fetch types, Megatron_McLargeHuge describes one:

However, in general you could autocomplete members that you saw used elsewhere in the code when you can infer that two objects have the same unknown or incomplete type. Do if I call somewhere, and y is the same type as x, y probably has a foo() method too. Also, if I have a function with parameter x and I call, you could search the code for other objects where is called. Then x could autocomplete methods defined on z's type, or invoked on z if z's type is unknown. It would be a usability question whether to err on the side of more or fewer potential completions. If the method name is unique across known classes, that's a pretty strong type hint, while calling __repr__ is not.



Too much magic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment