use strings to call functions

Klaus Neuner klausneuner72 at googlemail.com
Wed Feb 10 03:58:37 EST 2010


On Feb 9, 11:01 am, Stefan Behnel <stefan... at behnel.de> wrote:
> KlausNeuner, 09.02.2010 10:04:
>
> > my program is supposed to parse files that I have created myself and that
> > are on my laptop. It is not supposed to interact with anybody else
> > than me.
>
> Famous last words.
>
> Stefan

All right, I admit that eval() is evil and should never be used. Under
no circumstances. (Which is, of course, the reason, why Python has
eval().) The same applies to knives. You shouldn't use them. You
shouldn't even use them in your own kitchen. A man might enter your
kitchen, take your knife away and use it against you.



More information about the Python-list mailing list