A doubly linked list in Python