Commit 519e7d37 by Dmitry Moiseev Committed by devttys0

Support for argument math evaluation

parent 5cef3864
...@@ -188,13 +188,12 @@ class SmartSignature: ...@@ -188,13 +188,12 @@ 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
def _jump(self, data): def _jump(self, data):
''' '''
......
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