You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When exploring an api with tab completion, it is sometimes useful to distinguish between the public interface (names intended for use) and the implementation (unrelated imported modules, double underscore names and so on).
IPython could help, with minimal implementation difficulty, by putting names in all first during tab completion. For example,
[ LP comment 1 by: Fernando Perez, on 2010-04-25 22:08:23.288272+00:00 ]
Unfortunately I don't think that's possible, at least with readline. Readline uses a callback interface and expects only a list of completions. The printing/formatting of the completions is done by readline, not by us, and in a list there is no way of specifying what comes from where.
This would be possible, and it's a good idea, for more sophisticated guis that manage their own completion. I'm marking it as a wishlist so we keep it in mind moving forward, though at the terminal I'm afraid we're limited by readline's design.
We now only show the "public" methods (which don't start with _) by default. Is this satisfactory? Do we want to leave this open for the alternative frontends?
Original Launchpad bug 462648: https://bugs.launchpad.net/ipython/+bug/462648
Reported by: dholth (Daniel Holth).
When exploring an api with tab completion, it is sometimes useful to distinguish between the public interface (names intended for use) and the implementation (unrelated imported modules, double underscore names and so on).
IPython could help, with minimal implementation difficulty, by putting names in all first during tab completion. For example,
If I'm using the library, I don't care that urllib.py imports 'os'. Instead, why not show something more like:
everything else, or everything including all names:
(from above)
The text was updated successfully, but these errors were encountered: