We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ffa00dd commit 0941326Copy full SHA for 0941326
html5lib/trie/datrie.py
@@ -3,14 +3,15 @@
3
from itertools import chain
4
5
from datrie import Trie as DATrie
6
+from six import text_type
7
8
from ._base import Trie as ABCTrie
9
10
class Trie(ABCTrie):
11
def __init__(self, data):
12
chars = set()
13
for key in data.keys():
- if not isinstance(key, str):
14
+ if not isinstance(key, text_type):
15
raise TypeError("All keys must be strings")
16
for char in key:
17
chars.add(char)
0 commit comments