simpleeval icon indicating copy to clipboard operation
simpleeval copied to clipboard

Simple Safe Sandboxed Extensible Expression Evaluator for Python

Results 36 simpleeval issues
Sort by recently updated
recently updated
newest added

We tested that cache ast parsing result reduced more than 50% run time for our user case, it would be great if it can be merged. The cache is an...

Should allow the use cases outlined in https://github.com/danthedeckie/simpleeval/issues/25 Basically the expressions that have already gone through `ast.parse` are cached in the SimpleEval class. Whenever `eval` is called it checks if...

* There must be exactly one statement in input * Given statement must be an expression (assignment, augmented assignment, etc. are not allowed) Resolves #58 #65 #67

2.0

`simpleeval 0.9.10` So I just remembered that any valid assignment target can be used in a list comprehension! i.e. something like `[... for foo[0] in ...]` is valid syntax. ###...

bug
enhancement
next release

The following statement successfully executes. `simpleeval.simple_eval("a = 2")` And returns 2. I suggest that assignment operator is entirely disallowed as input to simple eval. Because "a == 2" can be...

2.0

Using `simple_eval` method expression like `True\nFalse` is evaluated to True, `False\nTrue` to False. It looks like only the first statement is taken from AST for evaluation. https://github.com/danthedeckie/simpleeval/blob/b47858d7153a05f64da16c4425c38f481e510d12/simpleeval.py#L328 I suggest that...

enhancement

so you could do: >>> s = SimpleEval() >>> s('22 + 20') 42 which would be rather sweet.

enhancement

This PR adds support for star-expresions when unpacking dicts and lists, e.g. `{'a': 0, **x, 'c': 3}` or `['a', *x, 'b']`. ~I am not sure if `ast.Starred` is available in...

Documentation on your simpleeval package (on github) has an explanation on how add `^` operator, but lacks an example of how `operators` paramater work is through a `dict` with `lambda`,...

enhancement
question

# Description Drop CI testing for Python 2.7 and Python 3.6, which have both reached end-of-life status. In addition, this adds a CHANGELOG, which is critical file to have for...