"Paul Moore" <p.f.mo...@gmail.com> a écrit dans le message de news:mailman.53.1510069830.2819.python-l...@python.org...
On 7 November 2017 at 15:39, ast <nomail@com.invalid> 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