[Python-ideas] Unpacking a dict

Michael Selik michael.selik at gmail.com
Sun May 29 16:37:54 EDT 2016

On Sun, May 29, 2016 at 1:49 PM Pavol Lisy <pavol.lisy at gmail.com> wrote:

> from my_test import VAR, setter, getter
> The more I understand python the more I see that I don't understand enough.

Seems like you expected the ``VAR`` in your __main__ module would be the
same variable as the one in the ``my_test`` module
Each module's globals are separate namespaces.
``from module import name`` is roughly equivalent to 3 lines:

    import module
    name = module.name
    del module
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20160529/f3c9e1fb/attachment.html>

More information about the Python-ideas mailing list