Message39923
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. |
|
Date |
User |
Action |
Args |
2007-08-23 15:13:06 | admin | link | issue553171 messages |
2007-08-23 15:13:06 | admin | create | |
|