[issue18039] dbm.open(..., flag="n") does not work and does not give a warning

Sashko Kopyl report at bugs.python.org
Fri May 31 13:53:14 CEST 2013


Sashko Kopyl added the comment:

Here is the output.


*** Python 3.3.2 (v3.3.2:d047928ae3f6, May 16 2013, 00:03:43) [MSC v.1600 32 bit (Intel)] on win32. ***
*** Remote Python engine  is active ***
>>> 
*** Remote Interpreter Reinitialized  ***
>>> 
<dbm.dumb._Database object at 0x02B95210>
yoqaA.dat exists? True
yoqaA.dir exists? True
b'hello' b'there'
>>> 


I would like to focus your attention, that flag "n" creates a database, but does not overwrite it once it is created. So in Windows case there is no difference between "c" and "n" flag.
You can have a look at this link where it was originally discussed.
http://stackoverflow.com/questions/16647131/how-to-empty-dbm-file-in-python-efficiently

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18039>
_______________________________________


More information about the Python-bugs-list mailing list