python-benedict/benedict/core/remove.py

10 lines
186 B
Python
Raw Permalink Normal View History

from benedict.utils import type_util
def remove(d, keys, *args):
if type_util.is_string(keys):
keys = [keys]
keys += args
for key in keys:
d.pop(key, None)