jmsv / ety-python

A Python module to discover the etymology of words
http://ety-python.rtfd.io
MIT License
144 stars 18 forks source link

Make origin search case-insensitive #8

Closed jmsv closed 6 years ago

jmsv commented 6 years ago
>>> ety.origins('Potato')
Traceback (most recent call last):
  File "/home/james/gitr/ety-python/ety/__init__.py", line 30, in origins
    origin = origins_dict[word]
KeyError: 'Potato'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/james/gitr/ety-python/ety/__init__.py", line 33, in origins
    raise ValueError(error)
ValueError: No etymology data available for word: Potato

How this exception is handled should be tidied up to avoid "During handling of the above exception..."