Quote:
Originally Posted by maxthegold
Slight problem with the code on the previous post, here is the corrected version.
Code:
# Do it again for capitalised words
m, o = regex.subn(rgx.format(key.capitalize()), new_name.capitalize(), m)
if do_count and o:
if n == 0:
data['counters'][key] = 0
data['total'] += o
data['counters'][key] = data['counters'].get(key) + o
Rookie error, not used to Python.
|
Thanks for your input on this maxthegold. Your improvement saves a lot of time when adding entries to my list and now I only have to run the one function.