New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tree should check word exists #13
Comments
Just for reference: the command line appears to be fixed, and correctly displays: $ python -m ety -t asfgds
No origins found for word: 'asfgds' but the api still generates a >>> print(ety.tree("asfgds"))
asfgds (English) Not sure what the correct return value should be if the word has no origins. Maybe >>> print(Tree())
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/treelib/tree.py", line 120, in __str__
self.__print_backend(func=write)
File "/treelib/tree.py", line 170, in __print_backend
line_type):
File "/treelib/tree.py", line 199, in __get_iter
raise NodeIDAbsentError("Node '%s' is not in the tree" % nid)
treelib.exceptions.NodeIDAbsentError: Node 'None' is not in the tree Is it also a possibility with the planned changes from #24 that when a |
Hmm, If we went with this behaviour, it might also make sense to also make |
Always outputs '(English)', since it's the default language. The word should be looked up in the data and not displayed if missing
The text was updated successfully, but these errors were encountered: