Hello-World/calc/__init__.py
rajjagirdar-root bde60ad530 Add safe expression evaluator (calc/engine/evaluator.py + builtins.py)
- evaluator.evaluate(expr, extra_names) returns (result_str, is_error)
- blocks __builtins__ to prevent arbitrary code execution
- handles ZeroDivisionError, ValueError, NameError with friendly messages
- builtins.SAFE_NAMES covers trig, hyperbolic, log, exp, rounding, constants
2026-05-13 11:24:44 -04:00

0 lines
Python