Feb-21-2021, 12:15 AM
(Feb-18-2021, 11:23 AM)Larz60+ Wrote: It 'has been stated' that eval is bad news
I refer you to: https://nedbatchelder.com/blog/201206/ev...erous.html
There are others who disagree.
right.
this is one of the reasons i want to avoid passing a string to eval(). fortunately, i am only needing to evaluate expressions in my code. there are no untrusted sources in this.
in a language i once created, it was possible to manipulate compiled code in a way that allowed passing the code to a function which could manipulate it further (pass it to another function) and/or evaluate/execute it perhaps more than once (using local values that can be changed). i'm just looking for a way to do something like this in Python.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.