absolute beginners question about API documentation

Alan Kennedy alanmk at hotmail.com
Sun Jul 6 21:02:12 CEST 2003


Markus Joschko wrote:

>>> Is there an API documentation like the javadoc API from java?

Dave Kuhlman wrote:

>> If you are asking about the *Python* API, then look here:
>>
>>     http://www.python.org/doc/current/lib/typesmapping.html

Markus Joschko wrote:

> Thanks. That's it. I hadn't suspect it there.

And don't forget the interactive help available on most objects,
through the use of the dir() and help() functions, e.g.

Python 2.2.3 (#42, May 30 2003, 18:12:08) [MSC 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> d = {}
>>> dir(d)
['__class__', '__cmp__', '__contains__', '__delattr__', '__delitem__',
'__doc__', '__eq__', '__ge__', '__getattribute__', '__getitem__',
'__gt__', '__hash__', '__init__', '__iter__', '__le__', '__len__',
'__lt__', '__ne__', '__new__', '__reduce__', '__repr__',
'__setattr__',
'__setitem__', '__str__', 'clear', 'copy', 'get', 'has_key', 'items',
'iteritems', 'iterkeys', 'itervalues', 'keys', 'popitem',
'setdefault',
'update', 'values']
>>> help(d.keys)
Help on built-in function keys:

keys(...)
    D.keys() -> list of D's keys

>>> help(d.has_key)
Help on built-in function has_key:

has_key(...)
    D.has_key(k) -> 1 if D has a key k, else 0

>>>

HTH,

-- 
alan kennedy
-----------------------------------------------------
check http headers here: http://xhaus.com/headers
email alan:              http://xhaus.com/mailto/alan




More information about the Python-list mailing list