tkinter MP working like a charm

Chris Angelico rosuav at gmail.com
Sun Dec 31 04:19:10 EST 2017


On Sun, Dec 31, 2017 at 8:03 PM, Abdur-Rahmaan Janhangeer
<arj.python at gmail.com> wrote:
> @Chris
>
> hum nice point
>
> it seems to be related to namespace convenience
>
> like
>
> 1 from x import *
>
> is likelier to cause conflicts than
>
> 2 import x

This is correct. Also, when you read the code, you can instantly tell
that "x.ALL" is not the same as the built-in "all" function, but it's
less obvious if they're both just simple names. Some modules are
designed to be star-imported (tkinter being one of them), but even
there - and *definitely* for other modules - it's much clearer to use
module imports.

ChrisA



More information about the Python-list mailing list