On Wed, Aug 12, 2020 at 12:03 PM Lele Gaifax 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
Chris Angelico writes:
> Interesting. You're passing an empty globals and a non-empty locals
> (the second and third arguments to exec, respectively). Is that
> deliberate? By the look of this code, it's meant to be at global scope
> (as if it's the top level code in a module), which is best done
On Tue, Aug 11, 2020 at 5:44 AM Lele Gaifax wrote:
>
> Hi all,
>
> today I faced an issue that, although very easy to fix, left me wondering
> about what causes it.
>
> The context is an application that execute small scripts coming from an
> external source (say, a database). The application firs
Hi all,
today I faced an issue that, although very easy to fix, left me wondering
about what causes it.
The context is an application that execute small scripts coming from an
external source (say, a database). The application first compile the script,
then execute it passing it some values: in t