Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Completion does not work for custom __getitem__ and __getattr__ #774

Open
zokrezyl opened this issue Jul 9, 2019 · 0 comments
Open

Completion does not work for custom __getitem__ and __getattr__ #774

zokrezyl opened this issue Jul 9, 2019 · 0 comments
Labels
bug

Comments

@zokrezyl
Copy link

@zokrezyl zokrezyl commented Jul 9, 2019

Hi,

While bpython makes prototyping much easier, I bumped into a bit annoying limitation.
Given the following trivial example I would expect to have a completion working after 'a[0].' . I bumped into this in a must more complex situation.

                                                                                                                            
    def __getitem__(self, name):                                                                                             
        return self                                                                                                          
                                                                                                                             
    def __getattr__(self, name):                                                                                             
        return self                                                                                                          
                                                                                                                             
    def __dir__(self):                                                                                                       
        return ["a", "b"]                                                                                                    
                                                                                                                             
                                                                                                                             
a = A()```


any hints?

Thanks a lot
@sebastinas sebastinas added the bug label Jul 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.