"Paul Moore" <[email protected]> a écrit dans le message de news:[email protected]...
On 7 November 2017 at 15:39, ast <[email protected]> wrote:


It's in the "tmp" module, where you defined it. But because you didn't
ask for a reference to it in your import statement, it's not
accessible to you[1].
Do

   import tmp
   print(tmp.a)

and you can see it.

Paul

[1] Technically you can find it via the globals of the function test,
as test.__globals__['a'], but if you understand how that works, you
wouldn't have been asking the question in the first place :-)

Clear, ty
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to