En Sat, 17 Nov 2007 01:56:22 -0300, Donn Ingle <[EMAIL PROTECTED]> escribió:
> for obj in list: > if 'foo' in obj.__class__.__dict__: > etc. > > Although I am concerned that it's a loop ('in') and so may be slower than > some other way to detect foo(). 'in' for dictionaries is fast and runs in constant time. You may be thinking about 'in' for lists, that runs in time proportional to the number of elements. -- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list