[SciPy-Dev] requesting code review: added close matches to constants.codata.value()
Nathaniel Smith
njs at pobox.com
Sun Apr 27 03:50:40 EDT 2014
Never call print from a library. Raise a KeyError with a custom message if
you want to do this.
difflib is built in to python, it's not a "dependency".
On 27 Apr 2014 08:39, "Kevin Davies" <kdavies4 at gmail.com> wrote:
> I changed scipy.constants.codata.values() to suggest alternative
> spellings when an entry isn't found. Instead of a key error,
> values('magnetic constant') prints what is shown in this screenshot.
>
> Here's the code comparison:
> https://github.com/kdavies4/scipy/compare/suggest-codata
>
> This introduces a dependency on difflib, which I haven't added to the
> installation.
>
> _______________________________________________
> SciPy-Dev mailing list
> SciPy-Dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20140427/d01d2d83/attachment.html>
More information about the SciPy-Dev
mailing list