C++ style linked list in Python