Binary search

John Machin sjmachin at
Thu Jan 16 21:48:21 CET 2003

Peter Hansen <peter at> wrote in message news:<3E26BA12.A8E9260B at>...
> Bengt Richter wrote:
> > 
> > On Wed, 15 Jan 2003 22:28:18 -0500, Peter Hansen <peter at> wrote:
> > >In any case, the OP fairly clearly indicated that he understood
> > >what the term "binary search" usually meant, and that he did not
> > >in fact mean that meaning...
> > >
> > (Continuing with nits ;-)
> > I'm sure the OP understood the distinctions, and in later posts
> > explicitly indicated what he meant, but my first impression was from
> > """
> > Hi,
> > 
> > I'm looking for a function that allows me to do a binary search in a file.
> > Can anyone point me in the good direction?
> > 
> > Thanks in advacne,
> > 
> > Rudy
> > """
> > I.e., it said "a binary search in a file" not "a search in a binary file".
> Please don't try to change history.  You're conveniently leaving out
> part of the query.  An accurate quotation is this:
> """I'm looking for a function that allows me to do a binary search in a file.
>    By binary search I mean searching for a sequence of bytes and not the binary
>    search as in the Python Cookbook
>    (
>    Can anyone point me in the good direction?
> """
> Now what part of the sentence starting with "By binary search I mean..."
> is unclear to you?  He clearly (to me) is saying that although he's used
> the term "binary search", he understands that it has a more standard
> definition but that he *does not mean that definition* (and, we should
> assume, he just couldn't think of another term for what he wants).
> -Peter

In mild partial defence of Bengt, I'd just like to point out (1) the
person you term the "OP" was in fact appending to a 2-message thread
from 1999 [an execrable habit IMHO] with subject "binary search" (2)
the pseudo-OP's first posting (message 3) omitted the clarifying
reference to the Cookbook; this was added in message 4, which may not
have been seen by others before they replied (to message 3).

Hoping this hasn't been distorted in translation from my native
Australian language,


More information about the Python-list mailing list