Ranter
Join devRant
Do all the things like
				++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
				Sign Up
			Pipeless API
 
				From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
				Learn More
			Comments
		
- 
				
				Ive never had any reason tu even use eval. Can someone give me an example of when it might be useful? (even if its not safe)
- 
				
				@Codex404 for a plotter created in Python in 15 mins.
 The text inserted by the user were inserted into a Function with only return "userformula".
 Later with MatPlotLib the script will plot the function.
 In the zone with eval are automatically included all the obj in math module
- 
				
				 rhein711938y@eisterman A friend of mine (beginner) wrote a Python script that calculated the derivative function of an function the user typed in. He showed it to me and I said: "You should not use eval()". rhein711938y@eisterman A friend of mine (beginner) wrote a Python script that calculated the derivative function of an function the user typed in. He showed it to me and I said: "You should not use eval()".
 He: "Oh, ok. May you write a parser?"
 I: "Wait! It's ok. Just use eval!"😂
Related Rants








 thou hast committed a grave sin
thou hast committed a grave sin
I know some people doing this!
undefined
eval is evil
bad habits