is attribute access a hash-lookup by name?

Steven Shaw steven_shaw at adc.com
Tue Jul 2 21:37:31 EDT 2002


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)?



More information about the Python-list mailing list