Skip to content

Commit 77465dc

Browse files
don't use lambda
Signed-off-by: Achille Roussel <[email protected]>
1 parent 5084d5b commit 77465dc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/dispatch/function.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ def decorator(f):
3636
def method(self, *args, **kwargs):
3737
if len(args) == 1 and len(kwargs) == 0 and callable(args[0]):
3838
return f(self, args[0])
39-
else:
40-
return lambda realf: f(self, realf, *args, **kwargs)
39+
def wrapper(func):
40+
return f(self, func, *args, **kwargs)
41+
return wrapper
4142

4243
return method
4344

0 commit comments

Comments
 (0)