absolute beginners question about API documentation

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Markus Joschko

    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
  • Dave Kuhlman

    #2
    Re: absolute beginners question about API documentation

    Markus Joschko wrote:
    [color=blue]
    > 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.
    >[/color]

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



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



    Hope this helps.

    - Dave

    --
    Dave Kuhlman

    dkuhlman@rexx.c om

    Comment

    • Markus Joschko

      #3
      Re: absolute beginners question about API documentation

      Dave Kuhlman wrote:
      [color=blue]
      > Markus Joschko wrote:
      >[color=green]
      >> 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.
      >>[/color]
      >
      > If you are asking about the *Python* API, then look here:
      >
      > http://www.python.org/doc/current/lib/typesmapping.html
      >[/color]

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

      Comment

      • Behrang Dadsetan

        #4
        Re: absolute beginners question about API documentation

        Dave Kuhlman wrote:[color=blue]
        > Markus Joschko wrote:[color=green]
        >>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.[/color]
        > 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[/color]

        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.

        Comment

        • Alan Kennedy

          #5
          Re: absolute beginners question about API documentation

          Markus Joschko wrote:
          [color=blue][color=green][color=darkred]
          >>> Is there an API documentation like the javadoc API from java?[/color][/color][/color]

          Dave Kuhlman wrote:
          [color=blue][color=green]
          >> If you are asking about the *Python* API, then look here:
          >>
          >> http://www.python.org/doc/current/lib/typesmapping.html[/color][/color]

          Markus Joschko wrote:
          [color=blue]
          > Thanks. That's it. I hadn't suspect it there.[/color]

          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.[color=blue][color=green][color=darkred]
          >>> d = {}
          >>> dir(d)[/color][/color][/color]
          ['__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'][color=blue][color=green][color=darkred]
          >>> help(d.keys)[/color][/color][/color]
          Help on built-in function keys:

          keys(...)
          D.keys() -> list of D's keys
          [color=blue][color=green][color=darkred]
          >>> help(d.has_key)[/color][/color][/color]
          Help on built-in function has_key:

          has_key(...)
          D.has_key(k) -> 1 if D has a key k, else 0
          [color=blue][color=green][color=darkred]
          >>>[/color][/color][/color]

          HTH,

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

          Comment

          • Alan Kennedy

            #6
            Re: absolute beginners question about API documentation

            Dave Kuhlman wrote:
            [color=blue]
            > 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[/color]

            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



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

            Comment

            • Ian Bicking

              #7
              Re: absolute beginners question about API documentation

              On Sun, 2003-07-06 at 12:44, Markus Joschko wrote:[color=blue]
              > Hi all,
              > I' new to python programming but a longtime java programmer.
              > Is there an API documentation like the javadoc API from java?[/color]

              http://python.org/doc/ , of course.
              [color=blue]
              > I'm want to know all methods I can use on dictionaries. Where can I get an
              > overview about these?[/color]

              You want to look at the Library Reference, in the built-in type section
              (mapping types). You can also try:
              [color=blue][color=green][color=darkred]
              >>> dir({})[/color][/color][/color]
              ['__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'][color=blue][color=green][color=darkred]
              >>> help({}.update)[/color][/color][/color]
              Help on built-in function update:

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



              Comment

              • Cousin Stanley

                #8
                Re: 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?
                | ...

                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


                Comment

                Working...