Skip to content

replace the dictionnary access/fallback with the more pythonic get - #14

Open
gcmalloc wants to merge 1 commit into
HotMaps:masterfrom
gcmalloc:helpers_get
Open

replace the dictionnary access/fallback with the more pythonic get#14
gcmalloc wants to merge 1 commit into
HotMaps:masterfrom
gcmalloc:helpers_get

Conversation

@gcmalloc

Copy link
Copy Markdown

Replace the follow code

a = dict()
value = "default_value"
try:
    value = a['key']
except:
    pass

by

a = dict()
value = a.get("key", "default_value")

in all instances of helpers.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant