Filip Gruszczyński grusz...@gmail.com added the comment:
Oh, I haven't noticed that. Using contextlib.closing solves my problem. Thanks.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13896
New submission from Filip Gruszczyński grusz...@gmail.com:
It would be cool if use could use with to manage shelf object and forget about
close.
--
messages: 152159
nosy: gruszczy
priority: normal
severity: normal
status: open
title: shelf doesn't work with 'with'
Changes by Filip Gruszczyński grusz...@gmail.com:
--
keywords: +patch
Added file: http://bugs.python.org/file24347/13896.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13896
___
Zachary Richey mach1...@gmail.com added the comment:
The docs for shelve(see:
http://docs.python.org/dev/library/shelve.html#shelve.open) recommend using
contextlib.closing for this purpose.
--
nosy: +zachary r.
___
Python tracker