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

Jupyter console autocompletion gives bad suggestions #114

Closed
fredcallaway opened this issue Jun 25, 2016 · 2 comments
Closed

Jupyter console autocompletion gives bad suggestions #114

fredcallaway opened this issue Jun 25, 2016 · 2 comments

Comments

@fredcallaway
Copy link

The main benefit of the Jupyter console for me is the autocompletion, but it is buggy for coconut. It suggests attributes that the object doesn't actually have.

In [7]: foo.   # TAB
foo.MatchError             foo._coconut_map           foo.foo
foo.__builtins__           foo._coconut_minus         foo.generator_stop
foo.__name__               foo._coconut_parallel_map  foo.map   # <== LOOK HERE
foo._coconut               foo._coconut_pipe          foo.parallel_map
foo._coconut_MatchError    foo._coconut_starpipe      foo.prepattern
foo._coconut_backpipe      foo._coconut_sys           foo.y3_map
foo._coconut_backstarpipe  foo._coconut_zip           foo.y3_zip
foo._coconut_bool_and      foo.addpattern             foo.recursive
foo._coconut_bool_or       foo.consume                foo.reduce
foo._coconut_compose       foo.count                  foo.takewhile
foo._coconut_count         foo.datamaker              foo.tee
foo._coconut_igetitem      foo.dropwhile              foo.zip

In [7]: foo.map
Traceback (most recent call last):
  File "/Users/fred/anaconda/lib/python3.5/site-packages/coconut/command.py", line 164, in run
    exec(code, self.vars)
  File "<string>", line 1, in <module>
AttributeError: 'list' object has no attribute 'map'

Also, perhaps the _coconut attributes should be hidden. I'm not sure if that's possible.

@evhub
Copy link
Owner

evhub commented Jun 25, 2016

Ah, I see the problem. Coconut is suggesting variables instead of attributes. And you're right, I should get rid of the _coconut names.

@evhub
Copy link
Owner

evhub commented Jun 25, 2016

Fixed in develop! Will be included in the next release.

@evhub evhub closed this as completed Jun 25, 2016
@evhub evhub added the resolved label Oct 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants