kalekundert / byoc

MIT License
0 stars 0 forks source link

Add `int_eval()` and `float_eval()` utilities #37

Closed kalekundert closed 2 years ago

kalekundert commented 2 years ago

These functions would evaluate arithmetic expressions without allowing arbitrary code to be executed, in the same vein as ast.literal_eval(). I should probably base my implementation off of ast.literal_eval(), in fact. It's pretty straight-forward.