31
rhein7
7y

I know some people doing this!

Comments
  • 6
    Agreed, blue ducks are the worst!
  • 1
    What could possibly go wrong
  • 2
    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)
  • 1
    @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
  • 1
    Never used eval
  • 1
    Cuz eval is evil 😈
  • 1
    @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!"😂
  • 1
    @rhein7 exactly!
    Only for speed :3
Add Comment