On Thu, 11 Mar 2010 07:56:59 -0500, Neal Becker wrote: > The example I showed was just a toy problem. The real problem is I > expect to call a function many times, and I want to avoid the overhead > of the 'if blah' everytime.
Unless the __call__ methods are very small, the overhead of one extra if and one extra attribute lookup will be insignificant. -- Steven -- http://mail.python.org/mailman/listinfo/python-list