En Wed, 19 Dec 2007 17:17:43 -0300, N L <[EMAIL PROTECTED]> escribió:

> How do I list the members of a class? Meaning, how do I know what are  
> the functions a particular class has, if i do not want to manually  
> browse through the class?

 From the interpreter, just print dir(class) or dir(instance); that  
includes both attributes and methods. Or use the interactive help:  
help(class), help(class.method)

Inside a program, use the inspect module: getmembers() retrieves all  
members (both attributes and methods), you can filter that using the  
various isXXX() functions.

-- 
Gabriel Genellina

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

Reply via email to