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 rhettinger
Recipients
Date 2002-05-09.18:43:07
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=80475

Nicely done!  The code is clean and runs in the smart mode 
without problems on my existing programs. I agree that the 
patch solves a real world problem.  The solution is clean, 
but a little expensive.

If there were a way to be able to tell if an entry had been 
altered, it would save the 100% writeback.  Unfortunately, 
I can't think of a way.

The docstring could read more smoothly and plainly.  Also, 
it should be clear that the cost of setting smart=1 is that 
100% of the entries get rewritten on close.

Two microscopically minor thoughts on the coding (feel free 
to disregard). Can some of the try/except blocks be 
replaced by something akin to 'if self.smart:'?  For the 
writeback loop, consider 'for k,v in cache.iteritems()' as 
it takes less memory and saves a lookup.
History
Date User Action Args
2007-08-23 15:13:06adminlinkissue553171 messages
2007-08-23 15:13:06admincreate