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

Shouldn't be possible to reassign Word.word property #38

Closed jmsv closed 6 years ago

jmsv commented 6 years ago

Word.origins is cached for an instance of a Word object - if word property is changed, origins is out of date

alxwrd commented 6 years ago

👍

Does .word become a @property (seems better than marking it private (._word)?

If so, on the @word.setter do we recalculate the origins, or raise an exception?

jmsv commented 6 years ago

Yeah, making it a property is a good idea

I was thinking either:

jmsv commented 6 years ago

This applies to Word.language too: shouldn't be reassigned