goodmami / wn

A modern, interlingual wordnet interface for Python
https://wn.readthedocs.io/
MIT License
197 stars 19 forks source link

Allow errors to be defined in the index file #146

Closed goodmami closed 2 years ago

goodmami commented 2 years ago

As part of #142, I imagined a warn key on the tables of deprecated projects. This issue is for tracking that feature.

I think I might prefer the more nouny warning instead of warn. The warning should be issued before the test for the version, so if someone from the future tries to get a then-current version for an outdated identifier (such as ewn:2025 instead of oewn:2025), they will see the warning about the ID change before the error message about the missing version.

goodmami commented 2 years ago

Actually I'm having second thoughts about this one. While it could be useful, I prefer simple solutions, and just raising a warning on any redirect is probably the easiest thing for now.

goodmami commented 2 years ago

Or even easier: raise an exception instead of a warning, and don't bother with redirects at all. This has the benefit that messages could be displayed that are not about redirects.