<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Apr 28, 2014 at 10:47 AM, Kevin Davies <span dir="ltr"><<a href="mailto:kdavies4@gmail.com" target="_blank">kdavies4@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks for everyone's help.  It sounds like the best option is to add<br>
this  recommendation system to constants.codata.find().  Please take a look:<br>
<a href="https://github.com/kdavies4/scipy/compare/codata-find" target="_blank">https://github.com/kdavies4/scipy/compare/codata-find</a><br>
<div class="im HOEnZb"><br>
<br>
On 04/28/2014 02:53 AM, Robert Kern wrote:<br>
> On Mon, Apr 28, 2014 at 1:48 PM, Pierre Haessig<br>
> <<a href="mailto:pierre.haessig@crans.org">pierre.haessig@crans.org</a>> wrote:<br>
>> Hi Kevin,<br>
>><br>
>> Just a random thought:  what about putting your recommendation system in<br>
>> a separate "search" function ?<br>
>> The KeyError raised by value(...) could be one-line message pointing to<br>
>> this search function.<br>
> The argument to KeyError should be the key that is causing the<br>
> problem, not a natural language message. That's why his attempt to use<br>
> a multi-line string got printed as its repr().<br>
><br>
>> That function, meant to be used interactively unlike value(), could use<br>
>> prints I guess.<br>
> But yes, I agree that adding a function specifically documented to be<br>
> used interactively would be a better place for this functionality.<br>
><br></div></blockquote><div><br></div><div>Maybe just add something like a `suggestion` function which returns a list of suggested keys. No need for a print statement, as the list will be displayed on the terminal.<br>
<br></div><div>Chuck <br></div></div></div></div>