summaryrefslogtreecommitdiffstats
path: root/Doc/lib/libbisect.tex
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2001-01-04 14:18:55 (GMT)
committerFred Drake <fdrake@acm.org>2001-01-04 14:18:55 (GMT)
commit4e18f07613f2cdf25f9436da36c88f16e783075a (patch)
treedbaf51358db85514076ded245625f6c5febb78dc /Doc/lib/libbisect.tex
parent288927f426b51cd2e051451184ecfb3223094728 (diff)
downloadcpython-4e18f07613f2cdf25f9436da36c88f16e783075a.zip
cpython-4e18f07613f2cdf25f9436da36c88f16e783075a.tar.gz
cpython-4e18f07613f2cdf25f9436da36c88f16e783075a.tar.bz2
Based on comments from Guido, do not describe bisect() and insert() as
being "for backward compatibility." Also revert to using bisect() in the example, since Guido thinks that is the best recommendation for typical usage.
Diffstat (limited to 'Doc/lib/libbisect.tex')
-rw-r--r--Doc/lib/libbisect.tex10
1 files changed, 5 insertions, 5 deletions
diff --git a/Doc/lib/libbisect.tex b/Doc/lib/libbisect.tex
index 2b27b9f..94d5175 100644
--- a/Doc/lib/libbisect.tex
+++ b/Doc/lib/libbisect.tex
@@ -39,7 +39,7 @@ The following functions are provided:
\end{funcdesc}
\begin{funcdesc}{bisect}{\unspecified}
- Alias for \function{bisect_right()} for backward compatibility.
+ Alias for \function{bisect_right()}.
\end{funcdesc}
\begin{funcdesc}{insort_left}{list, item\optional{, lo\optional{, hi}}}
@@ -57,7 +57,7 @@ The following functions are provided:
\end{funcdesc}
\begin{funcdesc}{insort}{\unspecified}
- Alias for \function{insort_right()} for backward compatibility.
+ Alias for \function{insort_right()}.
\end{funcdesc}
@@ -65,16 +65,16 @@ The following functions are provided:
\nodename{bisect-example}
The \function{bisect()} function is generally useful for categorizing
-numeric data. This example uses \function{bisect_right()} to look up a
+numeric data. This example uses \function{bisect()} to look up a
letter grade for an exam total (say) based on a set of ordered numeric
breakpoints: 85 and up is an `A', 75..84 is a `B', etc.
\begin{verbatim}
>>> grades = "FEDCBA"
>>> breakpoints = [30, 44, 66, 75, 85]
->>> from bisect import bisect_right
+>>> from bisect import bisect
>>> def grade(total):
-... return grades[bisect_right(breakpoints, total)]
+... return grades[bisect(breakpoints, total)]
...
>>> grade(66)
'C'