dbm/dictionary problem (bug?)

Mike Tibbs (tibbs@dopey.si.com)
Tue, 28 Jun 94 14:17 EDT

I get an error when using the "items" or "values" method
on a dictionary created via dbm. Is this a bug or did
I do something wrong.
(Environment is SPARC10, SunOS 4.1.3)

Here's a transcript:

tibbs dopey 168} python
Python 1.0.2 (Jun 27 1994)
Copyright 1991-1994 Stichting Mathematisch Centrum, Amsterdam
>>> import dbm
>>> dir(dbm)
['__name__', 'error', 'open']
>>> mydb = dbm.open('dbmfile','r',664)
>>> mydb
<Dbm_dictionary object at 59de8>
>>> mydb.first
Traceback (innermost last):
File "<stdin>", line 1
AttributeError: first
>>> print mydb
<Dbm_dictionary object at 59de8>
>>> len(mydb)
125
>>> mydb['tibbs']
'tibbs:dEh.LRxcrikQs:258:10:Mike Tibbs:/home/dopey/users/tibbs:/bin/tcsh'
>>> mydb.items()
Traceback (innermost last):
File "<stdin>", line 1
AttributeError: items
>>> mydb.keys()
['vanbaren', 'sdykstra', 'schanhal', 'meier', 'edgar', 'audit', 'ada',
'williams', 'kimberle', 'hamilton', 'francois', 'horton', 'farver',
...stuff deleted
>>> mydb.values()
Traceback (innermost last):
File "<stdin>", line 1
AttributeError: values
>>> mydb.has_key('tibbs')
1