79170921

Date: 2024-11-08 16:57:49
Score: 0.5
Natty:
Report link

You need to return the result of func(a, b) within the isNumeric function. Currently, nothing is returned.

Corrected:

def decoratorIsNumber(func):
    def isNumeric(a, b):
        a = a if str(a).isnumeric() else 0
        b = b if str(b).isnumeric() else 0
        return func(a, b) 
    return isNumeric
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: EuanG