Gabriel Hackebeil added the comment: All good points. Perhaps further emphasis on this in the documentation would be helpful to. As it stands, this module is a dangerous one for a naive user (like me) to stumble across.
Maybe introducing an “exact” or “slow" diff function to the module would help distinguish that behavior from the cmp function. One could then deprecate the shallow keyword for the cmp function. Gabe > On Jun 26, 2016, at 9:48 PM, Raymond Hettinger <rep...@bugs.python.org> wrote: > > > Raymond Hettinger added the comment: > > Changing an existing API is painful, especially so for cases like this that > have existed for a very, very long time. Such as a change would likely have > a detrimental effect on long-standing code relying on the existing behavior. > > The module itself is all about "comparing files efficiently" and most of its > code is about bypassing direct file reads. The original purpose of the > module seems to be about providing shallow compares, so your suggested change > goes directly against the grain of the module and its original intention of > being "fast by default". The docs are very clear about there being > trade-offs between correctness and time. > > If the module were just being released, you might have a good case (in > general, the safest options should be the default); however, the time for > this decision was a very long time ago. This ship has already sailed. > > ---------- > nosy: +rhettinger > > _______________________________________ > Python tracker <rep...@bugs.python.org> > <http://bugs.python.org/issue27396> > _______________________________________ ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27396> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com