I\'m optimizing some code whose main bottleneck is running through and accessing a very large list of struct-like objects. Currently I\'m using namedtuples, for readability
You can make your classes sequence like by adding __iter__, and __getitem__ methods, to make them sequence like (indexable and iterable.)
__iter__
__getitem__
Would an OrderedDict work? There are several implementations available, and it is included in the Python31 collections module.