From b079f51028571bc603b8d43761c29ff56273bffc Mon Sep 17 00:00:00 2001 From: Joel Martin Date: Sun, 6 Apr 2014 16:24:27 -0500 Subject: C,PHP,Python: stepA fixup. All tests/impls pass! --- python/core.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'python/core.py') diff --git a/python/core.py b/python/core.py index 92ae3d9..28d9c5e 100644 --- a/python/core.py +++ b/python/core.py @@ -34,7 +34,8 @@ def assoc(src_hm, *key_vals): def dissoc(src_hm, *keys): hm = copy.copy(src_hm) - for key in keys: del hm[key] + for key in keys: + if key in hm: del hm[key] return hm def get(hm, key): -- cgit v1.2.3