Skip to content

Deprecate offsetvector.__cmp__

This method is deprecated and will be removed in a future release because:

  1. According to the Python standard library documentation, cmp(a, b) is expected to return 0 if a == b. This method breaks that expectation.
  2. The cmp() method has been removed from Python 3.

Instead of cmp(a, b), you should call a.deltas != b.deltas.

Also fix the doctests so that we don't try to call the undefined function cmp() and cause a NameError.

Fixes #2 (closed).

Merge request reports

Loading