[issue3929] Incorrect exception raising in dbm.open on non-existing DB

2008-09-26 Thread Hagen Fürstenau
Hagen Fürstenau <[EMAIL PROTECTED]> added the comment: I didn't know until I had googled this: http://mail.python.org/pipermail/python-3000/2007-March/005916.html ___ Python tracker <[EMAIL PROTECTED]> __

[issue3929] Incorrect exception raising in dbm.open on non-existing DB

2008-09-25 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Did you know that... with python 2.x, "raise (x,y,z)" is equivalent to "raise x"! I could not find this in the documentation. Committed the patch to py3k as r66622. -- resolution: -> fixed status: open -> closed _

[issue3929] Incorrect exception raising in dbm.open on non-existing DB

2008-09-22 Thread Georg Brandl
Georg Brandl <[EMAIL PROTECTED]> added the comment: Amaury's patch looks good. -- nosy: +georg.brandl ___ Python tracker <[EMAIL PROTECTED]> ___ ___

[issue3929] Incorrect exception raising in dbm.open on non-existing DB

2008-09-22 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: dbm.error is documented as a tuple, and I'd prefer not to change this: http://docs.python.org/dev/3.0/library/dbm.html#dbm.error Since it says that its first member is another dbm.error exception, we could simply raise error[0](message

[issue3929] Incorrect exception raising in dbm.open on non-existing DB

2008-09-22 Thread Hagen Fürstenau
New submission from Hagen Fürstenau <[EMAIL PROTECTED]>: Opening a dbm database which doesn't exist without a "c" or "n" flag results in this exception: >>> import dbm >>> dbm.open("abc") Traceback (most recent call last): File "", line 1, in File "/home/MP.shadow/hagenf/local/src/py3k/Lib/