[IPython-dev] Flat is better than nested
Thomas Kluyver
takowl at gmail.com
Mon May 20 17:13:52 EDT 2013
On 20 May 2013 18:11, Aaron Meurer <asmeurer at gmail.com> wrote:
> On a somewhat unrelated note, if __all__ is supposed to represent
> those things in a module that are public API, would it make sense for
> IPython's tab completer to respect this, so that
>
> from module import <TAB>
>
> only showed those things in module.__all__, if module.__all__ is
> defined? To me, that would go a long way to solidifying this
> definition of __all__ in people's minds, or at least people like me
> who use IPython to prototype code that uses library code.
>
There's an option for this (c.IPCompleter.limit_to__all__), but it defaults
to False - I think the rationale is that you may want to use 'from foo
import bar' to explicitly import something that isn't included in __all__.
Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20130520/c115903c/attachment.html>
More information about the IPython-dev
mailing list