On Wed, Aug 12, 2020 at 12:03 PM Lele Gaifax <l...@metapensiero.it> wrote: > But I see this is somewhat fragile, and wonder about a proper fix, but isn't > that a reasonable usage of the "locals" argument to exec()? >
I'm not sure. Passing a locals argument to eval() I have sometimes done, but never exec(). I've always exec'd code at top level and then extracted something from globals - it seems the easiest. ChrisA -- https://mail.python.org/mailman/listinfo/python-list