Skip to content

Commit 357936f

Browse files
author
Sylvain MARIE
committed
as_function callable object now has the same signature than inner evaluate. Fixes #17
1 parent 480a7ff commit 357936f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mini_lambda/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def __init__(self, expression):
5858
"""
5959
self.expression = expression
6060

61-
def __call__(self, *args, **kwargs):
61+
def __call__(self, arg):
6262
"""
6363
Calling this object is actually evaluating the inner expression with the given arguments.
6464
So it behaves like a normal function.
@@ -67,7 +67,7 @@ def __call__(self, *args, **kwargs):
6767
:param kwargs:
6868
:return:
6969
"""
70-
return self.expression.evaluate(*args, **kwargs)
70+
return self.expression.evaluate(arg)
7171

7272
def as_expression(self):
7373
"""

0 commit comments

Comments
 (0)