Write a decorator factory trace(log) where log is a list that receives lines. Each traced call appends:
"{indent}→ name(args)", with arguments formatted with repr (positional first, then key=value), comma-separated"{indent}← name = result" (using repr)"{indent}✗ name raised ExceptionName", then re-raiseUnlock this and every premium problem across all tracks — plus hidden-test grading, advanced AI engineering modules and new content every week.
Start 7-day free trial