Reapply "correct minor typos in edgelist.py"

This reapplies commit d189147, which was inadvertently reverted in
commit 002d537.