[Python-Dev] Re: Adding 'lexists()' to os.path
Paul Moore
pf_moore at yahoo.co.uk
Mon Aug 23 00:37:56 CEST 2004
Tino Lange <tino.lange at isg.de> writes:
> Paul Moore wrote:
>> As an alternative, would there be any value in cacheing the last stat
>> result? In a sequence like this, with multiple calls for the same
>> argument, many stat calls would be replaced by one. And it's likely
>> that the checking overhead on cache misses would be minimal compared
>> to the cost of the stat call, so it's an overall win.
> you will never know how long the cached result is true. Files on disk
> can change outside your python script....
Doh. Sorry about that - I wasn't thinking hard enough before posting.
Back to sleep...
Paul.
--
Instant gratification takes too long -- Carrie Fisher
More information about the Python-Dev
mailing list