Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,5 @@
|
|||
>>> def eval_with_x(code, a, b):
|
||||
return eval(code, {'x':b}) - eval(code, {'x':a})
|
||||
|
||||
>>> eval_with_x('2 ** x', 3, 5)
|
||||
24
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
>>> def eval_with_args(code, **kwordargs):
|
||||
return eval(code, kwordargs)
|
||||
|
||||
>>> code = '2 ** x'
|
||||
>>> eval_with_args(code, x=5) - eval_with_args(code, x=3)
|
||||
24
|
||||
>>> code = '3 * x + y'
|
||||
>>> eval_with_args(code, x=5, y=2) - eval_with_args(code, x=3, y=1)
|
||||
7
|
||||
Loading…
Add table
Add a link
Reference in a new issue