Skip to content

Commit 613f1fe

Browse files
EdCauntmloubout
authored andcommitted
misc: Refactor and tidy decorator
1 parent 373990a commit 613f1fe

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

devito/tools/utils.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -362,10 +362,7 @@ def wrapper(*args):
362362
# An argument is symbolic, so give up and assume default
363363
return default
364364

365-
try:
366-
return func(*args)
367-
except TypeError:
368-
return default
365+
return func(*args)
369366

370367
return wrapper
371368

@@ -375,10 +372,10 @@ def wrapper(*args):
375372
@avoid_symbolic(default=False)
376373
def smart_lt(a, b):
377374
"""An Lt that gives up and returns False if supplied a symbolic argument"""
378-
return bool(a < b)
375+
return a < b
379376

380377

381378
@avoid_symbolic(default=False)
382379
def smart_gt(a, b):
383380
"""A Gt that gives up and returns False if supplied a symbolic argument"""
384-
return bool(a > b)
381+
return a > b

0 commit comments

Comments
 (0)