From a70c9722a00adb3ad35a0857a49bab60cecf6c2f Mon Sep 17 00:00:00 2001 From: Aparna Komarla Date: Mon, 30 Mar 2026 01:22:25 -0700 Subject: [PATCH] Using copy.deepcopy() --- impl.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/impl.py b/impl.py index 2e6196a..9c6369c 100644 --- a/impl.py +++ b/impl.py @@ -18,16 +18,16 @@ def gen_impl_off(offenses, offenses = utils.clean_blk(data = offenses) # Remove exceptions from the list of offenses - offenses_woe = offenses[:] + offenses_woe = copy.deepcopy(offenses) for rel in impl_rel.keys(): if (rel != 'all'): for off in offenses: if rel in off: - offenses_woe.remove(rel) + offenses_woe.remove(off) if how == 'inclusive': # Initialize list of implied offenses - add the baseline offenses - impl_off = offenses[:] + impl_off = copy.deepcopy(offenses_woe) else: impl_off = []