Message25755
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?
|
|
Date |
User |
Action |
Args |
2007-08-23 14:32:59 | admin | link | issue1234674 messages |
2007-08-23 14:32:59 | admin | create | |
|