anydbm - a simple question
Randall Hopper
aa8vb at yahoo.com
Fri Jan 21 11:07:15 EST 2000
Straight from the Effbot guide, but it fails when you try to add an element.
Any idea what it doesn't like?
>>> import anydbm
>>> db = anydbm.open( "database", "c" )
>>> db[ "1" ] = "one"
Traceback (innermost last):
File "<stdin>", line 1, in ?
File "/home/rhh/software/python-1.5.2/lib/python1.5/dumbdbm.py", line 111,\
in __setitem__
(pos, siz) = self._addval(val)
File "/home/rhh/software/python-1.5.2/lib/python1.5/dumbdbm.py", line 87, \
in _addval
f.write('\0'*(npos-pos))
TypeError: can't multiply sequence with non-int
--
Randall Hopper
aa8vb at yahoo.com
More information about the Python-list
mailing list