[New-bugs-announce] [issue32830] tkinter documentation suggests "from tkinter import *", contradicting PEP8

ChrisRands report at bugs.python.org
Mon Feb 12 07:51:45 EST 2018


New submission from ChrisRands <chrisrands0 at gmail.com>:

Issue arose from this SO post: https://stackoverflow.com/questions/48746351/documentation-is-contradicting-pep8

The tkinter documentation suggests:

from tkinter import *

https://docs.python.org/3/library/tkinter.html

But this obviously contradicts PEP8:
"Wildcard imports (from <module> import *) should be avoided"

https://www.python.org/dev/peps/pep-0008/#imports

Is tkinter a valid exception or is this a documentation bug?

The commit of this line to the documentation is >10 years old (at least Python 2.4 I think): https://github.com/python/cpython/commit/116aa62bf54a39697e25f21d6cf6799f7faa1349#diff-05a258c160de90c51c1948689f788ef7R53

----------
assignee: docs at python
components: Documentation
messages: 312045
nosy: ChrisRands, docs at python
priority: normal
severity: normal
status: open
title: tkinter documentation suggests "from tkinter import *", contradicting PEP8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32830>
_______________________________________


More information about the New-bugs-announce mailing list