class dEvent(dObject):
...
         def __getattr__(self, att):
                 if self.EventData.has_key(att):
                         return self._eventData[att]
                 raise AttributeError, "%s.%s object has no attribute %s." % (
                         self.__class__.__module__, self.__class__.__name__, 
att)

If this code is run as much as i think it is (I haven't tried to use any of the 
profiling tools yet) I bet things would speed up by replacing the if with a try.

something like:

   def __getattr__(self, att):
     try:
       return self._eventData[att]
     except AttributeError:
       raise AttributeError, "%s.%s object has no attribute %s." % (
        self.__class__.__module__, self.__class__.__name__, att)

I am tempted to say just skip the try and let python raise the error - no clue 
what impact that would have on functionality.

Carl K


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/dabo-dev/[EMAIL PROTECTED]

Reply via email to