[Python-ideas] Fwd: Why do equality tests between OrderedDict keys/values views behave not as expected?

Stephen J. Turnbull stephen at xemacs.org
Fri Dec 18 22:24:54 EST 2015


Andrew Barnert via Python-ideas writes:

 > Would having a values view hang for 30 seconds and then come back
 > with the answer you intuitively wanted instead of giving the wrong
 > answer in 20 millis be an improvement? (Either way, you're going to
 > learn the same lesson: don't compare values views. I'd rather learn
 > that in 20 millis.)

I don't think this is an appropriate argument.  I don't check every
computation my Python programs do.  There's a good chance it would
take years to learn not to compare values views because it's sometimes
wrong (eg, if in my use case most of the time view_a is view_b or not
equal according to my desired definition).  OTOH, I do check my watch
many times a day, and am very protective of my time; I would notice a
30-second hang in that case.

Speaking of 30-second hangs, I really wish you'd trim (the alternative
is to stop reading your posts, and I really don't want to do that
either).  If you won't trim, please top-post, at least for those posts
which have S/N ratios on the order of 10^-2 (which have been frequent
recently).





More information about the Python-ideas mailing list