Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #27135
| Date | 2012-08-16 03:20 +0100 |
|---|---|
| From | MRAB <python@mrabarnett.plus.com> |
| Subject | Re: dbf.py API question concerning Index.index_search() |
| References | <502C3011.7070103@stoneleaf.us> <502C3304.70805@tim.thechases.com> <502C3CFB.8080504@stoneleaf.us> <502C3EAF.5050802@tim.thechases.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.3339.1345083600.4697.python-list@python.org> (permalink) |
On 16/08/2012 01:28, Tim Chase wrote: > On 08/15/12 19:21, Ethan Furman wrote: >> The well-hidden clue was this line: >> >> nearest returns where the match should be instead of raising an error >> >> And my question should have been: >> >> What should the return value be when nearest == True? > > Ah, well that's somewhat clearer. Return the closest and not bother > to let the user know it was inexact. Upon requesting it with > nearest=True, they *knew* that the result might be a nearest match. > Though if they ask for nearest, an exact match *better* be the > nearest if it exists. :-P > > I'd say the API-user shouldn't ask for what they don't want. > +1
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: dbf.py API question concerning Index.index_search() MRAB <python@mrabarnett.plus.com> - 2012-08-16 03:20 +0100
csiph-web