Simon Burton wrote:
>>>>class A(object):
> 
> ...   def foo(self): pass
> ...
> 
>>>>class B(A):
> 
> ...   pass
> ...
> 
>>>>b=B()
>>>>b.foo
> 
> <bound method B.foo of <__main__.B object at 0xb7b1924c>>
> 
> How can I work out what class b.foo was defined in ?
> 
> 
> Simon.
> 

b.__class__

-- 
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Angeles, CA 90095

http://www.jamesstroud.com/
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to