As I understand it, in Python, an object is an associative array or hash. I imagine this means that every attribute access is a hash-lookup by name. Does the implementation optimise this away somehow? Is there a way to have structs/records in Python where the members of the struct are looked up by offset (not by name)?