samples/ed.py: tweak docstrings and comments