OOP data structs / algos in python