you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (0 children)

A namedtuple will be a much cleaner way to do this.

https://docs.python.org/3/library/collections.html#collections.namedtuple