[Zope-dev] _getOb or __getattr__?

Chris Withers chrisw@nipltd.com
Wed, 07 Mar 2001 14:57:33 +0000


Shane Hathaway wrote:
> 
> No.  The expensive part is invoking Python code from C.  It's the same
> problem described by the documentation for the Python sort() method:
> it's much faster to sort() then reverse() than it is to sort() with a
> comparison function that reverses the elements.  Invoking C from Python
> is fast, but invoking Python from C apparently requires a lot of work.

Thanks, that actually explains (completely unrelated to __getattr__ ;-) why one
of our Zope products is so dog slow right now :-)

cheers,

Chris