Exercises
- The
rlcompleter
enhancement we created currently only handles dictionaries. Try and extend the code so it supports lists, strings, and tuples as well. - Add colors to the completer (hint: use
colorama
for the coloring). - Instead of manually completing using our own object introspection, try and use the
jedi
library for autocompletion, which does static code analysis.Static code analysis inspects code without executing it. This means it’s entirely safe to run, even on foreign code, as opposed to the autocompletion we wrote earlier, which runs the code in
object.keys()
. - Try to create a
Hello <ipywidget>
so the name of the person can be edited through a notebook without code changes. - Try and create a script that will look for a given pattern through all of your previous
ipython
sessions.
Example answers for these exercises can be found on GitHub: https://github.com/mastering-python/exercises...