468,306 Members | 1,419 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

Outdated documentation

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?


Oct 17 '05 #1
1 1317
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.

Oct 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

35 posts views Thread by Markus Dreyer | last post: by
23 posts views Thread by Carter Smith | last post: by
6 posts views Thread by silverbob | last post: by
18 posts views Thread by Joe (MCAD) | last post: by
4 posts views Thread by Agos | last post: by
6 posts views Thread by Srdja123 | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.