A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/ipython/ipython/issues/70/ below:

IPython should prioritize __all__ during tab completion · Issue #70 · ipython/ipython · GitHub

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,

import urllib
urllib.
urllib.ContentTooShortError urllib._localhost urllib.quote
urllib.FancyURLopener urllib._noheaders urllib.quote_plus
urllib.MAXFTPCACHE urllib._nportprog urllib.reporthook
urllib.URLopener urllib._passwdprog urllib.socket
urllib.all urllib._portprog urllib.splitattr
urllib.builtins urllib._queryprog urllib.splithost
urllib.class urllib._safemaps urllib.splitnport
urllib.delattr urllib._tagprog urllib.splitpasswd
urllib.dict urllib._thishost urllib.splitport
urllib.doc urllib._typeprog urllib.splitquery
urllib.file urllib._urlopener urllib.splittag
urllib.format urllib._userprog urllib.splittype
urllib.getattribute urllib._valueprog urllib.splituser
urllib.hash urllib.addbase urllib.splitvalue
urllib.init urllib.addclosehook urllib.ssl
urllib.name urllib.addinfo urllib.string
urllib.new urllib.addinfourl urllib.sys
urllib.package urllib.always_safe urllib.test
urllib.reduce urllib.basejoin urllib.test1
urllib.reduce_ex urllib.ftpcache urllib.thishost
urllib.repr urllib.ftperrors urllib.time
urllib.setattr urllib.ftpwrapper urllib.toBytes
urllib.sizeof urllib.getproxies urllib.unquote
urllib.str urllib.getproxies_environment urllib.unquote_plus
urllib.subclasshook urllib.localhost urllib.unwrap
urllib.version urllib.main urllib.url2pathname
urllib._ftperrors urllib.noheaders urllib.urlcleanup
urllib._have_ssl urllib.os urllib.urlencode
urllib._hextochr urllib.pathname2url urllib.urlopen
urllib._hostprog urllib.proxy_bypass urllib.urlretrieve
urllib._is_unicode urllib.proxy_bypass_environment urllib.warnings

If I'm using the library, I don't care that urllib.py imports 'os'. Instead, why not show something more like:

urllib.
all: ['urlopen', 'URLopener', 'FancyURLopener', 'urlretrieve', 'urlcleanup', 'quote', 'quote_plus', 'unquote', 'unquote_plus', 'urlencode', 'url2pathname', 'pathname2url', 'splittag', 'localhost', 'thishost', 'ftperrors', 'basejoin', 'unwrap', 'splittype', 'splithost', 'splituser', 'splitpasswd', 'splitport', 'splitnport', 'splitquery', 'splitattr', 'splitvalue', 'getproxies']

everything else, or everything including all names:
(from above)


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4