First off, I'm aware of eval's disadvantages and it will be used in an experiment I want to make only.
I'm creating a script that works just like a Brute-Force algorithm but it won't break passwords but find the solution to a special form of an equation (more details are unnecessary).
There will be lots of strings filled with (often syntactically incorrect) terms like 1+2)+3
- Is the only way to get the results of these terms via
eval
? - How to make python ignore syntactical errors occurring in
eval
? (The program shouldn't terminate)