diff --git a/cpmpy/expressions/python_builtins.py b/cpmpy/expressions/python_builtins.py index 7f563f0df..76b24d7a7 100644 --- a/cpmpy/expressions/python_builtins.py +++ b/cpmpy/expressions/python_builtins.py @@ -136,9 +136,7 @@ def abs(element): if the element given is not a CPMpy expression, the built-in is called else an Absolute functional global constraint is constructed. """ - if is_any_list(element): - raise CPMpyException('abs does not accept iterables') - if not isinstance(element, Expression): + if is_any_list(element) or not isinstance(element, Expression): return builtins.abs(element) return Abs(element)