Skip to content

Commit

Permalink
Revert to iterkeys
Browse files Browse the repository at this point in the history
  • Loading branch information
insolor committed Sep 8, 2023
1 parent ac5e319 commit d1f92da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pymorphy2/opencorpora_dict/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def save_compiled_dict(compiled_dict, out_path, source_name, language_code):
logger.debug("computing metadata..")

def _dawg_len(dawg):
return sum(1 for k in dawg.keys())
return sum(1 for k in dawg.iterkeys()) # method .keys() of DAWG/DAWG-Python returns a list

logger.debug(' words_dawg_len')
words_dawg_len = _dawg_len(compiled_dict.words_dawg)
Expand Down

0 comments on commit d1f92da

Please sign in to comment.