mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-12 18:26:30 +03:00
Fix normalize_string_keys function'
This commit is contained in:
parent
67ade63fc4
commit
99982684b0
|
@ -79,7 +79,7 @@ def is_config(python2=None, python3=None, windows=None, linux=None, osx=None):
|
|||
def normalize_string_keys(old):
|
||||
'''Given a dictionary, make sure keys are unicode strings, not bytes.'''
|
||||
new = {}
|
||||
for key, value in old:
|
||||
for key, value in old.items():
|
||||
if isinstance(key, bytes_):
|
||||
new[key.decode('utf8')] = value
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue
Block a user