This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author erno
Recipients christian.heimes, erno
Date 2007-12-12.10:47:45
SpamBayes Score 0.18172446
Marked as misclassified No
Message-id <1197456467.22.0.894187029688.issue1592@psf.upfronthosting.co.za>
In-reply-to
Content
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 self.dict.has_key(key)
  File "shelve.py", line 94, in getdict
    raise IOError, 'shelf has been closed'
IOError: shelf has been closed
Files
File name Uploaded
shelve.diff erno, 2007-12-12.10:47:45
History
Date User Action Args
2007-12-12 10:47:47ernosetspambayes_score: 0.181724 -> 0.18172446
recipients: + erno, christian.heimes
2007-12-12 10:47:47ernosetspambayes_score: 0.181724 -> 0.181724
messageid: <1197456467.22.0.894187029688.issue1592@psf.upfronthosting.co.za>
2007-12-12 10:47:47ernolinkissue1592 messages
2007-12-12 10:47:46ernocreate