DanielStutzbach / blist

A list-like type with better asymptotic performance and similar performance on small lists
Other
310 stars 36 forks source link

Bug in blist.sortedlist compare #77

Open grantjenks opened 8 years ago

grantjenks commented 8 years ago
In [1]: from blist import sortedlist

In [2]: sortedlist([1,2,3,4]) <= sortedlist([1,2,3])
Out[2]: True # Ooops, expected False.

In [3]: [1,2,3,4] <= [1,2,3]
Out[3]: False

The last line of _cmp_op should probably be:

    return op(len(self), len(that))