[issue4356] Add "key" argument to "bisect" module functions

2010-04-14 Thread Brian Scearce
Brian Scearce added the comment: For what it's worth, after I posted my comment, I realized I could use tuple comparison semantics: loc = bisect.bisect(mapping, (line,)) since my key happens to be at index 0. "key=" woul

[issue4356] Add "key" argument to "bisect" module functions

2010-04-14 Thread Brian Scearce
Brian Scearce added the comment: This was closed over a year ago, but since mark.dickinson was asking for convincing use-cases: I'm breaking up a file into line-delimited chunks. These chunks are non-overlapping, contiguous, and tend to be fairly large, so I'm just recording the