(func)
| 218 | |
| 219 | print("Example 8") |
| 220 | def fixed_log(func): |
| 221 | @functools.wraps(func) |
| 222 | def wrapper(*args, **kwargs): |
| 223 | try: |
| 224 | result = func(*args, **kwargs) |
| 225 | except BaseException as e: # Fixed |
| 226 | result = e |
| 227 | raise |
| 228 | finally: |
| 229 | print( |
| 230 | f"Called {func.__name__}" |
| 231 | f"(*{args!r}, **{kwargs!r}) " |
| 232 | f"got {result!r}" |
| 233 | ) |
| 234 | |
| 235 | return wrapper |
| 236 | |
| 237 | |
| 238 | print("Example 9") |
nothing calls this directly
no outgoing calls
no test coverage detected