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
On 3 Aug 2019, at 12:18, Dan Sommers <2QdxY4RzWzUUiLuE@potatochowder.com> 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 -- python-ideas@python.org To unsubscribe send an email to python-ideas-leave@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/GYT5DG... Code of Conduct: http://python.org/psf/codeofconduct/