Outdated documentation

Discussion in 'Python' started by Laszlo Zsolt Nagy, Oct 17, 2005.

  1. Hi All,


    This is from the documentation of the dbhash module:

    Returns the key next key/value pair in a database traversal. The
    following code prints every key in the database |db|, without having
    to create a list in memory that contains them all:

    print db.first()
    for i in xrange(1, len(db)):
    print db.next()


    Apparently, it is different for gdbm:

    k = db.firstkey()
    while k != None:
    print k
    k = db.nextkey(k)

    I think both of them is outdated. This should be:

    for key,value in db.iteritems():
    print key,value

    Is this the good place to post?

    Les
    Laszlo Zsolt Nagy, Oct 17, 2005
    #1
    1. Advertising

  2. Laszlo Zsolt Nagy

    Kent Johnson Guest

    Laszlo Zsolt Nagy wrote:
    > Is this the good place to post?


    Follow the "About this document" link at the bottom of any page of Python docs for information about submitting change requests.

    Kent
    Kent Johnson, Oct 17, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Harlan Osier

    HTML is outdated now !

    Harlan Osier, Jul 13, 2004, in forum: HTML
    Replies:
    13
    Views:
    781
    Webcastmaker
    Jul 14, 2004
  2. Raf256

    why IE 7 will be outdated

    Raf256, Dec 23, 2005, in forum: HTML
    Replies:
    2
    Views:
    928
  3. Jim Bancroft

    Use XSL to remove "outdated" nodes?

    Jim Bancroft, Jul 2, 2003, in forum: XML
    Replies:
    6
    Views:
    1,040
    Jim Bancroft
    Jul 2, 2003
  4. Markus Dreyer

    Accelerated C++ book outdated?

    Markus Dreyer, Jan 21, 2004, in forum: C++
    Replies:
    35
    Views:
    2,139
    Attila Feher
    Jan 28, 2004
  5. Mark Rae
    Replies:
    2
    Views:
    36,966
    Mark Rae
    Jul 11, 2006
Loading...

Share This Page