Commit 519e7d37 by Dmitry Moiseev Committed by devttys0

Support for argument math evaluation

parent 5cef3864
...@@ -188,10 +188,9 @@ class SmartSignature: ...@@ -188,10 +188,9 @@ class SmartSignature:
arg = self._get_keyword_arg(data, keyword) arg = self._get_keyword_arg(data, keyword)
if arg: if arg:
for string_int in arg.split('+'): if re.match("[0-9\+\-\*]*",arg):
try: value = eval(arg)
value += str2int(string_int) else:
except:
self.invalid = True self.invalid = True
return value return value
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment