Miki Tebeka [EMAIL PROTECTED] added the comment:
Any reason this is not in trunk yet?
--
nosy: +tebeka
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1592
___
Changes by Raymond Hettinger [EMAIL PROTECTED]:
--
assignee: - rhettinger
nosy: +rhettinger
versions: -Python 2.5
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1592
___
Martin v. Löwis [EMAIL PROTECTED] added the comment:
The usual reasons, probably: nobody had time to work on it, as there are
so many other things to do.
--
nosy: +loewis
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1592
Raymond Hettinger [EMAIL PROTECTED] added the comment:
I'm working on this one. Alternate patch attached.
The problem with the old one is that it slows down every access to the
shelf and it prevents assignment to self.dict which has always been
allowed.
The new patch improves error
Raymond Hettinger [EMAIL PROTECTED] added the comment:
Fixed in r65233
--
resolution: - fixed
status: open - closed
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1592
___
Erno Kuusela added the comment:
How about the following patch. With it, you get an IOError.
s = shelve.open('/tmp/t', 'c')
s.has_key('foo')
0
s.close()
s.has_key('foo')
Traceback (most recent call last):
File stdin, line 1, in ?
File shelve.py, line 107, in has_key
return
New submission from Erno Kuusela:
shelve objects set self.dict = 0 in their close() method. this
results in errors such as TypeError: unsubscriptable object and
AttributeError: 'int' object has no attribute 'has_key'.
This is fairly baffling for the user.
self.dict = 0 in close() is present in