Skip to content
Snippets Groups Projects
Commit 70960fc9 authored by Piotr Maślanka's avatar Piotr Maślanka
Browse files

.

parent b7a935f5
No related branches found
No related tags found
No related merge requests found
......@@ -283,10 +283,9 @@ def typed(*t_args, **t_kwargs):
def inner(*args, **kwargs):
if inspect.ismethod(fun):
cargs = args[1:] if inspect.ismethod(fun) else args
print(args)
t_args = itertools.chain([None], t_args)
for argument, typedescr in zip(cargs, t_args):
for argument, typedescr in zip(args, t_args):
if typedescr is not None:
if not isinstance(argument, typedescr):
raise TypeError('Got %s, expected %s' % (type(argument), typedescr))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment