Differences between revisions 4 and 5
Revision 4 as of 2007-05-24 21:00:33
Size: 630
Editor: nc7-rba-1
Comment:
Revision 5 as of 2007-05-25 16:25:34
Size: 710
Editor: CameronLaird
Comment:
Deletions are marked like this. Additions are marked like this.
Line 11: Line 11:

CL's answer: no, Python cannot introspect like Java; it can only do better.

I don't know ;) but entering the command:

>>> dir()

into the Python interpreter gives a list of defined classes and variables.

Using the TAB key on one of the existing objects opens a list of possible completions, i.e. its methods/attributes.

I'm not sure this is what the OP is asking. I think s/he's referring to the API documentation rather than the API itself. Calling help(object) in the interpreter is a good start for help on an object.

CL's answer: no, Python cannot introspect like Java; it can only do better.

Asking for Help/Can Python introspect like Java? (last edited 2011-03-26 23:23:03 by PaulBoddie)

Unable to edit the page? See the FrontPage for instructions.