mpylab.tools.numeric_eval module¶
mpylab.tools.numeric_eval module.
- mpylab.tools.numeric_eval.safe_numeric_eval(expr: str) float
Safely evaluate simple numeric expressions with SI prefixes.
- Allowed:
1e9 1e9/4 10M 2.45G 100kHz 3.3V -20dBm (2.45G + 100M) / 2
- Not allowed:
abs(1) x + 1 __import__(‘os’).system(…) self.x