31 Oct
2001
31 Oct
'01
4:20 p.m.
Does this (untested) code make sense as a possible addition to statcache?
For me, statcache was a failed experiment. What's the use you have in mind? Why can't you use os.lstat() directly?
One obvious problem I see is that if stat(path) had been called before lstat(path), you'd pull the wrong info out of the cache. You could get around this by maintaining separate stat and lstat caches or caching a different key (e.g. (path, "l")) for the lstat variety.
Definitely use two caches or a separate key. --Guido van Rossum (home page: http://www.python.org/~guido/)