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
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to