[Python-ideas] Any chance on (slowly) deprecating `eval` and `exec` as builtins?
Michel Desmoulin
desmoulinmichel at gmail.com
Thu Nov 9 15:39:49 EST 2017
Le 07/11/2017 à 22:39, אלעזר a écrit :
>
>
> בתאריך יום ג׳, 7 בנוב׳ 2017, 22:59, מאת Chris Angelico
> <rosuav at gmail.com <mailto:rosuav at gmail.com>>:
>
>
> -1 on hiding eval/exec; these features exist in many languages, and
> they're identically dangerous everywhere. Basically, use eval only
> with text from the owner of the system, not from anyone untrusted.
>
>
> I am sorry. I don't understand the reasons you are giving here. One
> sentence is a fact, and I agree with the other, so I must be missing
> something.
>
> Elazar
>
>
Also: why are eval and exec even builtins ? Builtins are for stuff you
use often. I never saw in my entire career anybody use it often.
More information about the Python-ideas
mailing list