why is this so slow?
lkirsh at cs.ubc.ca
Thu Sep 2 06:00:45 CEST 2004
I created the following class (I know it's a dirty hack) so I could do
foo.bar instead of using a dictionary and having to type foo['bar'] :
def __getattribute__(self, attr):
if not hasattr(self, attr):
but its use is totally slowing down my program. Why is it so slow and is
there a better way?
More information about the Python-list