PyRival icon indicating copy to clipboard operation
PyRival copied to clipboard

The new SortedList method naming scheme is not user friendly

Open heidenrei opened this issue 2 years ago • 3 comments

The old method names were better as they directly copied sortedcontainers. Using multiset method names is annoying.

heidenrei avatar Jun 08 '22 23:06 heidenrei

Can you be more specific?

bjorn-martinsson avatar Jun 09 '22 14:06 bjorn-martinsson

SortedList in python uses bisect_left (not lower_bound) and bisect_right (not upper_bound) and add method (not insert) lower_bound and upper_bound is the method names for C++ and many python users arent very good at it, which makes it very confusing

lower_bound -> bisect_left upper_bound -> bisect_right insert -> add

ensure consistency between the main SortedList implementation and this implementation

bogoconic1 avatar Jun 11 '22 05:06 bogoconic1

A remove method would be good as s.pop(s.lower_bound(val)) is not so obvious

Mukundan314 avatar Jun 13 '22 04:06 Mukundan314