Go Back   Rhinocerus > Newsgroup > Newsgroup comp.lang.python

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 08-16-2012, 02:20 AM
MRAB
Guest
 
Posts: n/a
Default Re: dbf.py API question concerning Index.index_search()

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
Reply With Quote
Alt Today
Advertising
 
and become member of Rhinocerus
Standard Sponsored Links

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT. The time now is 10:42 PM.


Copyright ©2009

LinkBacks Enabled by vBSEO 3.3.0 RC2 © 2009, Crawlability, Inc.