Closed alxwrd closed 6 years ago
Looks awesome, although found a problem: this assumes the word param (if string) is English due to the Word
object being initialised without a lang argument, and lang defaulting to 'eng'. There should be a parameter supporting other languages
I'm tempted to suggest that the word
param should only be accepted as a Word
object - this seems like a better structure and means we can reduce repeated code (checking for strings etc)
Looks perfect :heart_eyes:
This extracts the tree logic out of
Word
and into its own class. I've based the class offtreelib.Tree
so it functions like aTree
object, but with the added bonus that we can control the__repr__
.It's also now valid to have an empty tree, so maybe closes #13?