How to `eval` code with `def`?

Jon Ribbens jon+usenet at unequivocal.eu
Sun May 28 21:10:28 EDT 2017


On 2017-05-29, Peng Yu <pengyu.ut at gmail.com> wrote:
> I got the following error when I try to eval the following code with
> def. Does anybody know what is the correct way to evaluation python
> code that contains `def`? Thanks.

exec



More information about the Python-list mailing list