​​
For the _readline_ module, there is a typo in the second code example, starting with the documentation for Python 3.5 (I have also noticed it in the documentation for the Python 3.6 (dev) documentation).

import atexit
import os
import realine
histfile = os.path.join(os.path.expanduser("~"), ".python_history")

Should be fixed to:

import atexit import os import readline histfile = os.path.join(os.path.expanduser("~"), ".python_history")
Referenced URL(s):
- https://docs.python.org/3.5/library/readline.html
- https://docs.python.org/3.6/library/readline.html

--
​​

Alec Nunn
​​