Unexpected result when comparing method with variable

Ron_Adam radam2 at tampabay.rr.com
Mon Apr 4 23:53:20 EDT 2005


On Mon, 4 Apr 2005 23:34:41 -0400, David Handy
<david at handysoftware.com> wrote:

I'm not sure if this is the best way. But it might work.


for method, params in deferred:
    method(*params)
	try:
        if method.im_func is c.f.im_func:
            # handle a special case
    except:
        if method is c.f:
            # handle a special case



Cheers,
Ron




More information about the Python-list mailing list