Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-104145: Use fully-qualified cross reference types for the bisect module #104172

Merged
merged 4 commits into from
May 8, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions Doc/library/bisect.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
expensive comparison operations, this can be an improvement over
linear searches or frequent resorting.

The module is called :mod:`bisect` because it uses a basic bisection

Check warning on line 19 in Doc/library/bisect.rst

View workflow job for this annotation

GitHub Actions / Docs

py:meth reference target not found: __eq__

Check warning on line 19 in Doc/library/bisect.rst

View workflow job for this annotation

GitHub Actions / Docs

py:meth reference target not found: __lt__
algorithm to do its work. Unlike other bisection tools that search for a
specific value, the functions in this module are designed to locate an
insertion point. Accordingly, the functions never call an :meth:`__eq__`
Expand Down Expand Up @@ -70,7 +70,7 @@

Insert *x* in *a* in sorted order.

This function first runs :func:`bisect_left` to locate an insertion point.

Check warning on line 73 in Doc/library/bisect.rst

View workflow job for this annotation

GitHub Actions / Docs

py:meth reference target not found: insert
Next, it runs the :meth:`insert` method on *a* to insert *x* at the
appropriate position to maintain sort order.

Expand All @@ -90,7 +90,7 @@
Similar to :func:`insort_left`, but inserting *x* in *a* after any existing
entries of *x*.

This function first runs :func:`bisect_right` to locate an insertion point.

Check warning on line 93 in Doc/library/bisect.rst

View workflow job for this annotation

GitHub Actions / Docs

py:meth reference target not found: insert
Next, it runs the :meth:`insert` method on *a* to insert *x* at the
appropriate position to maintain sort order.

Expand Down Expand Up @@ -140,7 +140,7 @@
Searching Sorted Lists
----------------------

The above :func:`bisect` functions are useful for finding insertion points but
The above :func:`.bisect` functions are useful for finding insertion points but
AA-Turner marked this conversation as resolved.
Show resolved Hide resolved
can be tricky or awkward to use for common searching tasks. The following five
functions show how to transform them into the standard lookups for sorted
lists::
Expand Down Expand Up @@ -186,8 +186,8 @@

.. _bisect-example:

The :func:`bisect` function can be useful for numeric table lookups. This
example uses :func:`bisect` to look up a letter grade for an exam score (say)
The :func:`.bisect` function can be useful for numeric table lookups. This
example uses :func:`.bisect` to look up a letter grade for an exam score (say)
based on a set of ordered numeric breakpoints: 90 and up is an 'A', 80 to 89 is
a 'B', and so on::

Expand All @@ -198,7 +198,7 @@
>>> [grade(score) for score in [33, 99, 77, 70, 89, 90, 100]]
['F', 'A', 'C', 'C', 'B', 'A', 'A']

The :func:`bisect` and :func:`insort` functions also work with lists of
The :func:`.bisect` and :func:`insort` functions also work with lists of
tuples. The *key* argument can serve to extract the field used for ordering
records in a table::

Expand Down