Add update_exc util function

This commit is contained in:
Ines Montani 2016-12-08 13:58:12 +01:00
parent 1256232fad
commit 66c7348cda
1 changed files with 6 additions and 0 deletions

View File

@ -108,6 +108,12 @@ def compile_infix_regex(entries):
return re.compile(expression)
def update_exc(exc, additions):
overlap = set(exc.keys()).intersection(set(additions))
assert not overlap, overlap
exc.update(additions)
def normalize_slice(length, start, stop, step=None):
if not (step is None or step == 1):
raise ValueError("Stepped slices not supported in Span objects."