This sounds like a perfect opportunity to prove a third party module could be useful. I'm not sure how to configure tab completion callbacks in every environment like ipython, Jupyter, Python shell, PyCharm, VS Code, vim, or whatever.

But without getting to that step (which is definitely possible with the right incantations for each), you could definitely create this and publish it on PyPI:

>>> from howto import q
>>> q('email')
email  can be sent with the `smtp` module
email messages can be created and manipulated with the `email` module
email can be retrieved with the `pop3` and `smtp` modules

The actual dictionary or search tool that finds relevant messages is 100x more work than wiring in the tab-completion hook to some particular environment.

On Sun, Aug 4, 2019, 1:15 PM Anders Hovmöller <> wrote:

> On 3 Aug 2019, at 12:18, Dan Sommers <> wrote:
> Once I know what SMTP is, and what the smtplib module does,
> and I've used it a couple of times, then seeing the list of
> names inside the module might remind me how to use it.
> So maybe SMTP is an extreme case.  I'm sure there are others.
> How does TAB completion help me to discover hashlib, if all I
> know is that I want the SHA-3 of some file?
> Again, I'm not disputing the usefulness of TAB completion;
> my point is that it's a sub-optimal tool for discoverability

It seems like there is a nugget of an idea of how to make a truly awesome autocomplete in your example. What if if you type email + tab and there is no symbol it said "email is sent with the smtp module"? That would be pretty great!

/ Anders
Python-ideas mailing list --
To unsubscribe send an email to
Message archived at
Code of Conduct: