fix string/array (sequence) multiplications with integer.
This commit is contained in:
1 parent
47205dd7f3
commit
bdcbac160b
3 files changed
+10
-8
No files matched your search
@@ -250,6 +250,8 @@ def _element_calculate(evaluator, left, operator, right):
|
||||
# for iterables, ignore * operations
|
||||
if isinstance(left, iterable.Array) or _is_string(left):
|
||||
return [left]
|
||||
elif isinstance(right, iterable.Array) or _is_string(right):
|
||||
return [right]
|
||||
elif operator == '+':
|
||||
if _is_number(left) and _is_number(right) or _is_string(left) and _is_string(right):
|
||||
return [create(evaluator, left.obj + right.obj)]
|
||||
|
||||
Reference in new issue
Block a user