ipython/ipython — pull request #1528 by takluyver (2012-03-27 16:08:10+00:00)
Title: Tab completion optionally respects __all__ (+ dir2() cleanup)

Patches sent by @drtimcouper.

* Tab completion of attributes can optionally be limited to names defined in `__all__` (if it is defined).
* Cleanup and tests of dir2() function.

The patches ran together a bit, so I took the easy option and stuck them both in one pull request.