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

SourceForge.net noreply at sourceforge.net
Wed Jul 7 16:22:40 CEST 2004


Bugs item #982806, was opened at 2004-06-30 11:29
Message generated for change (Comment added) made by akuchling
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: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Roy Smith (roysmith)
>Assigned to: A.M. Kuchling (akuchling)
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.


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

>Comment By: A.M. Kuchling (akuchling)
Date: 2004-07-07 10:22

Message:
Logged In: YES 
user_id=11375

The code is wrong.  The bug is fixed by patch #984672 by
James Lamanna, which has been applied to CVS and the 2.3 branch.


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

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