Commit 6100640c authored by Raphael Boidol's avatar Raphael Boidol

use pythonic form of key access

Has the advantage of producing fewer checks, as most words will be multiples.
parent ccdb542c
......@@ -359,9 +359,9 @@ class WordCloud(object):
continue
# Look in lowercase dict.
if word_lower in d:
try:
d2 = d[word_lower]
else:
except KeyError:
d2 = {}
d[word_lower] = d2
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment