Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #27135 > unrolled thread

Re: dbf.py API question concerning Index.index_search()

Started byMRAB <python@mrabarnett.plus.com>
First post2012-08-16 03:20 +0100
Last post2012-08-16 03:20 +0100
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: dbf.py API question concerning Index.index_search() MRAB <python@mrabarnett.plus.com> - 2012-08-16 03:20 +0100

#27135 — Re: dbf.py API question concerning Index.index_search()

FromMRAB <python@mrabarnett.plus.com>
Date2012-08-16 03:20 +0100
SubjectRe: dbf.py API question concerning Index.index_search()
Message-ID<mailman.3339.1345083600.4697.python-list@python.org>
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

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web