FAQ: Linked Lists: Python - Linked Lists Implementation II

Right, but if we use repr then we can just print() instead of calling the function each time.

Is there any advantage to using the getter and setter methods over just referencing the class’s arguments?
For example, if you had to set a new “next_node” is there a difference between doing it like this:
my_node.next_node = new_next_node
or like this:
my_node.set_next_node(new_next_node)

Thanks!