[Python-Dev] Imports with underscores

Chris Barker chris.barker at noaa.gov
Tue Jan 10 11:49:28 EST 2017


On Mon, Jan 9, 2017 at 12:29 PM, Terry Reedy <tjreedy at udel.edu> wrote:

> The tkinter doc still has
>
> ...to use Tkinter all you need is a simple import statement:
>   import tkinter
> Or, more often:
>   from tkinter import *
>
> Should this be changed?
>

yes, it should.

I would suggest suggesting something like:

import tkinter as tk

following the similar convention of wxPython, numpy, matplotlib, (all
large widely used packages that started their lives with import *
recommendations...)

-CHB




-- 

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20170110/9a2d0ad4/attachment.html>


More information about the Python-Dev mailing list