Skip to content

Commit

Permalink
Check args follow requirements or late cryptic erros will ensue
Browse files Browse the repository at this point in the history
  • Loading branch information
piccolbo committed Oct 21, 2019
1 parent 819cd02 commit 4738614
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions autosig/autosig.py
Expand Up @@ -87,6 +87,7 @@ class Signature:

def __init__(self, *params, **kwparams):
"""See class docs."""
assert all(map(lambda x: len(x) == 2, params)), "Non keyword args must be pairs"
all_params = list(chain(iter(params), kwparams.items()))
self.params = OrderedDict(sorted(all_params, key=keyfun(l=len(all_params))))
self._late_init = identity
Expand Down

0 comments on commit 4738614

Please sign in to comment.