Paul Ianas added the comment: Sure, it is your call. As said, this is rather an enhancement.
Still, if I were to decide, I would chose: 1. not to break the API <=> raise IndexError instead of ValueError in case hi is invalid. 2. to protect against illegal values: as said, if hi < 0 bisect_* always returns 0 (whatever the searched value). 3. I would implement a single _range_check(_len, lo, hi) method to do this logic (DRY). That being said, from my point of view this ticket can be closed. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue22683> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com