Basic usage
Input
@count_successful def is_positive(n): return n > 0 is_positive(3) is_positive(0) print(is_positive.successful_calls)
Output
1
is_positive(3) returns True (counts), is_positive(0) returns False (does not count). The successful_calls attribute should be 1.