By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
439,942 Members | 1,788 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 439,942 IT Pros & Developers. It's quick & easy.

Outdated documentation

P: n/a

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)):
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
Share this Question
Share on Google+
1 Reply

P: n/a
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.