[ python-Bugs-982806 ] gdbm.open () fails with a single argument

SourceForge.net noreply at sourceforge.net
Wed Jun 30 11:29:16 EDT 2004


Bugs item #982806, was opened at 2004-06-30 11:29
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=982806&group_id=5470

Category: Extension Modules
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Roy Smith (roysmith)
Assigned to: Nobody/Anonymous (nobody)
Summary: gdbm.open () fails with a single argument

Initial Comment:
I am running:

Python 2.3.4 (#3, Jun 29 2004, 21:48:03) 
[GCC 3.3 20030304 (Apple Computer, Inc. build 1495)] on darwin

Darwin Roy-Smiths-Computer.local 7.4.0 Darwin Kernel Version 
7.4.0: Wed May 12 16:58:24 PDT 2004; root:xnu/xnu
-517.7.7.obj~7/RELEASE_PPC  Power Macintosh powerpc

release 1.8.3 of GNU dbm.

I've got a readable gdbm file:
-rw-r--r--  1 roy  roy  12288 30 Jun 09:52 status.gdbm

If I try to open it with no flag argument, it fails.  Explicitly 
specifying 'r' as a 2nd argument works.

>>> import gdbm
>>> gdbm.open ('status.gdbm')
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
gdbm.error: Flag ' ' is not supported.
>>> gdbm.open ('status.gdbm', 'r')
<gdbm.gdbm object at 0x354050>

The on-line doc says the 2nd argument is optional:
http://www.python.org/doc/current/lib/module-gdbm.html

It's not clear if it's the code or the doc that wrong.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=982806&group_id=5470



More information about the Python-bugs-list mailing list