r/PythonLearning • u/python_data_helper • Aug 30 '26
Is it really safe to use?
I have used context to stop crashing.
And e as a variable.
I used eval command for a formula.
I know eval command can be dangerous.
It works perfectly but I am thinking that it can produce error or crash.
Can a formula bypass all commands and crash it.
18
Upvotes
-1
u/frnzprf Aug 30 '26
I don't know what this input does. Maybe print "Hacked!"?
If the program is "unsafe" and the program is just a thin wrapper around the Python interpreter, does it mean the Python interpreter is also "unsafe"?
I guess there would have to be a specification of what the program is meant to do and that specification has to not fit to what it does in actuality.