468,136 Members | 1,460 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,136 developers. It's quick & easy.

absolute beginners question about API documentation

Hi all,
I' new to python programming but a longtime java programmer.
Is there an API documentation like the javadoc API from java?

I'm want to know all methods I can use on dictionaries. Where can I get an
overview about these?
I looked on python.org but haven't found such an overview.

Thanks,
Markus
Jul 18 '05 #1
7 1712
Markus Joschko wrote:
Hi all,
I' new to python programming but a longtime java programmer.
Is there an API documentation like the javadoc API from java?

I'm want to know all methods I can use on dictionaries. Where can
I get an overview about these?
I looked on python.org but haven't found such an overview.


If you are asking about the *Python* API, then look here:

http://www.python.org/doc/current/lib/typesmapping.html

If you are asking about the C API (which is less likely but
possible), then look here:

http://www.python.org/doc/current/api/dictObjects.html

Hope this helps.

- Dave

--
Dave Kuhlman
http://www.rexx.com/~dkuhlman
dk******@rexx.com
Jul 18 '05 #2
Dave Kuhlman wrote:
Markus Joschko wrote:
Hi all,
I' new to python programming but a longtime java programmer.
Is there an API documentation like the javadoc API from java?

I'm want to know all methods I can use on dictionaries. Where can
I get an overview about these?
I looked on python.org but haven't found such an overview.


If you are asking about the *Python* API, then look here:

http://www.python.org/doc/current/lib/typesmapping.html


Thanks. That's it. I hadn't suspect it there.
Jul 18 '05 #3
Dave Kuhlman wrote:
Markus Joschko wrote:
I'm want to know all methods I can use on dictionaries. Where can
I get an overview about these?
I looked on python.org but haven't found such an overview.

If you are asking about the *Python* API, then look here:
http://www.python.org/doc/current/lib/typesmapping.html
If you are asking about the C API (which is less likely but
possible), then look here:

http://www.python.org/doc/current/api/dictObjects.html


Maybe one should add for better comprehension that dictionaries in
python are builtin types.

So when you look for them in documentation, you should look into the
basics and not for some Standard Library class as you would in the Java
world.

Hope it helps,
Ben.

Jul 18 '05 #4
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
Jul 18 '05 #5
Dave Kuhlman wrote:
If you are asking about the *Python* API, then look here:

http://www.python.org/doc/current/lib/typesmapping.html

If you are asking about the C API (which is less likely but
possible), then look here:

http://www.python.org/doc/current/api/dictObjects.html


I think that for completeness, and given the OPs java background, it's
probably worth mentioning the Java API to the jython interpreter as
well

http://www.jython.org/docs/javadoc/index.html

--
alan kennedy
-----------------------------------------------------
check http headers here: http://xhaus.com/headers
email alan: http://xhaus.com/mailto/alan
Jul 18 '05 #6
On Sun, 2003-07-06 at 12:44, Markus Joschko wrote:
Hi all,
I' new to python programming but a longtime java programmer.
Is there an API documentation like the javadoc API from java?
http://python.org/doc/ , of course.
I'm want to know all methods I can use on dictionaries. Where can I get an
overview about these?


You want to look at the Library Reference, in the built-in type section
(mapping types). You can also try:
dir({}) ['__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({}.update)

Help on built-in function update:

update(...)
D.update(E) -> None. Update D from E: for k in E.keys(): D[k] =
E[k]

Jul 18 '05 #7
| Hi all,
| I' new to python programming but a longtime java programmer.
| Is there an API documentation like the javadoc API from java?
| ...

Markus ...

I find the pydoc module handy for helping
to find Python information ...

The following command line starts pydoc
with a small GUI as a Python documentation server
with search and browse options ...

python YourPythonPath/Lib/pydoc.py -g

The browse option is useful because it also lists
docs for any installed site-packages ...

--
Cousin Stanley
Human Being
Phoenix, Arizona
Jul 18 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

18 posts views Thread by John Salerno | last post: by
26 posts views Thread by Clodoaldo Pinto | last post: by
17 posts views Thread by JD | last post: by
6 posts views Thread by W. Watson | last post: by
2 posts views Thread by =?Utf-8?B?UmFrZXNo?= | last post: by
1 post views Thread by gcdp | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.