diff --git a/nltk/util.py b/nltk/util.py index 2af0fb05d7..d04544b8e4 100644 --- a/nltk/util.py +++ b/nltk/util.py @@ -1332,8 +1332,9 @@ def as_dict(self, d=None): >>> from nltk.util import Trie >>> trie = Trie(["abc", "def"]) - >>> trie.as_dict() - {'a': {'b': {'c': {True: None}}}, 'd': {'e': {'f': {True: None}}}} + >>> expected = {'a': {'b': {'c': {True: None}}}, 'd': {'e': {'f': {True: None}}}} + >>> trie.as_dict() == expected + True """ def _default_to_regular(d):