[issue44227] help(bisect.bisect_left)

2021-06-06 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset b5cedd098043dc58ecf9c2f33774cd7646506a92 by Miss Islington (bot) in branch '3.10': bpo-44227: Update bisect docstrings (GH-26548) (GH-26563) https://github.com/python/cpython/commit/b5cedd098043dc58ecf9c2f33774cd7646506a92 --

[issue44227] help(bisect.bisect_left)

2021-06-06 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +25152 pull_request: https://github.com/python/cpython/pull/26563 ___ Python tracker

[issue44227] help(bisect.bisect_left)

2021-06-06 Thread PeterChu
Change by PeterChu : -- nosy: +PeterChu nosy_count: 2.0 -> 3.0 pull_requests: +25146 pull_request: https://github.com/python/cpython/pull/26548 ___ Python tracker ___

[issue44227] help(bisect.bisect_left)

2021-05-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Conceptually, yes, but the function does return an index, The function does not return an index. It returns an integer that represents an insertion point. The documentation is clear about this: Locate the insertion point for x in a to maintain

[issue44227] help(bisect.bisect_left)

2021-05-24 Thread Mallika Bachan
Mallika Bachan added the comment: Conceptually, yes, but the function does return an index, and values are stored at these indices. The index it returns holds the leftmost occurrence of the target (should the target exist) >>> bisect.bisect_left([1,2,2,3],2) 1 If we insert at this index, it

[issue44227] help(bisect.bisect_left)

2021-05-24 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> not a bug stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue44227] help(bisect.bisect_left)

2021-05-24 Thread Mallika Bachan
Change by Mallika Bachan : -- keywords: +patch pull_requests: +24933 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26340 ___ Python tracker ___

[issue44227] help(bisect.bisect_left)

2021-05-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: I there is a misunderstanding here. The bisect functions never point *to* a value. Instead, they are documented to return "insertion points". Those always occur just before or after a specific value: values: 10 20 30 30 30 40

[issue44227] help(bisect.bisect_left)

2021-05-24 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: -> rhettinger nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing

[issue44227] help(bisect.bisect_left)

2021-05-24 Thread Mallika Bachan
New submission from Mallika Bachan : Documentation issue. help(bisect.bisect_left) says: "... if x already appears in the list, i points just before the leftmost x already there." but in fact, it actually points *to* the leftmost x already there -- messages: 394280 nosy: