Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: dbf.py API question concerning Index.index_search()

Reply
Thread Tools

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

 
 
MRAB
Guest
Posts: n/a
 
      08-16-2012
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.
>
> I'd say the API-user shouldn't ask for what they don't want.
>

+1
 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
dbf.py API question concerning Index.index_search() Ethan Furman Python 7 08-16-2012 05:46 PM
Re: dbf.py API question concerning Index.index_search() Tim Chase Python 0 08-16-2012 12:28 AM
Re: dbf.py API question concerning Index.index_search() Ethan Furman Python 0 08-16-2012 12:21 AM
Re: dbf.py API question concerning Index.index_search() Tim Chase Python 0 08-15-2012 11:38 PM
Re: Question concerning Timer Control Kevin Spencer ASP .Net 2 09-21-2004 08:36 PM



Advertisments