Yurttas/PL/SL/python/docs/core-python-programming/doc/152/lib/module-cmpcache.html

From ZCubes Wiki
Revision as of 18:32, 7 November 2013 by MassBot1 (talk | contribs) (Created page with "<div class="navigation"> {| width="100%" cellspacing="2" align="center" | yurttas/PL/SL/python/docs/core-python-programming/doc/152/lib/module-time.html|[[Image:yurttas...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

6.8 cmpcache -- Efficient file comparisons

The cmpcache module provides an identical interface and similar functionality as the cmp module, but can be a bit more efficient as it uses statcache.stat() instead of os.stat() (see the statcache module for information on the difference).

Note: Using the statcache module to provide stat() information results in trashing the cache invalidation mechanism: results are not as reliable. To ensure ``current'' results, use cmp.cmp() instead of the version defined in this module, or use statcache.forget() to invalidate the appropriate entries.


Send comments on this document to python-docs@python.org.