[vic]
> I'm doing some evil things in Python and I would find it useful to
> determine which class a method is bound to when I'm given a method
> pointer.

Here you go:

>>> class Foo:
...   def bar(self):
...     pass
...
>>> Foo.bar.im_class
<class __main__.Foo at 0x008ED720>
>>> Foo().bar.im_class
<class __main__.Foo at 0x008ED720>
>>>

-- 
Richie Hindle
[EMAIL PROTECTED]

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to