Python - Zelle book uses eval(), is it wrong?

后端 未结 5 1398
醉酒成梦
醉酒成梦 2021-01-05 07:47

PLEASE NOTE: This is NOT about the use of eval(), it is about the potential quality (or lack thereof) of a book it is used and taught in. SO already has countless threads ab

5条回答
  •  礼貌的吻别
    2021-01-05 08:38

    Since eval is so out of place and unnecessary in the example you give, I would certainly have doubts about the safety of other parts of the book. Is the author going to suggest that you append a user entered string to a SQL query?

    I think it could be worth finding the author's email address and asking him about it directly.

提交回复
热议问题