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 pvrijlandt
Recipients
Date 2005-08-28.20:24:58
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=1307917

The cache is buggy too; it can be fooled by changing the cwd 
between calls. Also, if it caches (a, b) it does not cache (b, 
a). Is this caching feature really useful? Maybe it's up to the 
caller to record what comparisons have been made. If a 
caching function is to be provided, it should recognize the (b, 
a) case and maybe also infer from (a, b) and (b, c) about (a, 
c). (My programs remember an md5-signature)
I propose to eliminate the caching feature.

Also I propose to publish cmp_shallow and cmp_bytes which 
I think will make the unit easier to understand and verify.
cmp_bytes is of course _do_cmp, with a check added for 
length equality.
Then, the docs should be updated to whatever 
implementation for cmp is chosen, because non-shallow 
comparison is ill-specified.

cmp should return a bool.

what should cmp do with funny input like a dir? It now returns 
false. Would an exception be better?

BTW: is it really useful in _do_cmp to have a local variable 
bufsize? is 8k still optimal?
History
Date User Action Args
2007-08-23 14:32:59adminlinkissue1234674 messages
2007-08-23 14:32:59admincreate