* Fix for issue #17 * Updating version (and) Adding Travis CI support * Adding Build status to README
This commit is contained in:
parent
8c4229944f
commit
0e8723b822
7 changed files with 128 additions and 27 deletions
|
|
@ -113,9 +113,10 @@ def _get_occurrence(dictionary, item, keyword):
|
|||
|
||||
def recrusion(dictionary):
|
||||
if item == 'key':
|
||||
occurrence[0] += 1 if dictionary.get(keyword) else 0
|
||||
elif keyword in dictionary.values():
|
||||
occurrence[0] += dictionary.values().count(keyword)
|
||||
if dictionary.get(keyword) is not None:
|
||||
occurrence[0] += 1
|
||||
elif keyword in list(dictionary.values()):
|
||||
occurrence[0] += list(dictionary.values()).count(keyword)
|
||||
for key, value in iteritems(dictionary):
|
||||
if isinstance(value, dict):
|
||||
recrusion(dictionary=value)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue