HCoop
/
jackhill
/
mal.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
09c082b
)
Remove unnecessary lookup in 'dissoc'
author
Campbell Barton
<ideasman42@gmail.com>
Wed, 13 Sep 2017 02:00:34 +0000
(12:00 +1000)
committer
GitHub
<noreply@github.com>
Wed, 13 Sep 2017 02:00:34 +0000
(12:00 +1000)
python/core.py
patch
|
blob
|
blame
|
history
diff --git
a/python/core.py
b/python/core.py
index
d87f1e8
..
b52768d
100644
(file)
--- a/
python/core.py
+++ b/
python/core.py
@@
-36,7
+36,7
@@
def assoc(src_hm, *key_vals):
def dissoc(src_hm, *keys):
hm = copy.copy(src_hm)
for key in keys:
- if key in hm: del hm[key]
+ hm.pop(key, None)
return hm
def get(hm, key):