[issue32830] tkinter documentation suggests "from tkinter import *", contradicting PEP8

2020-12-01 Thread Tom Middleton
Tom Middleton added the comment: While I agree that it shouldn't be imposed on changing previous code, changing the documentation isn't changing the previous code it is encouraging future code. I think that the documentation should have a caveat. I'm seeing a lot of new code using tkinter

[issue32830] tkinter documentation suggests "from tkinter import *", contradicting PEP8

2018-02-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I want to add that the star import is more convenient when you experiment with Tkinter in REPL. You don't know what names will be needed when import Tkinter. The interpreter core has a special support of Tkinter. You don't need

[issue32830] tkinter documentation suggests "from tkinter import *", contradicting PEP8

2018-02-12 Thread ChrisRands
ChrisRands added the comment: Ok thanks both for the clarification! -- ___ Python tracker ___

[issue32830] tkinter documentation suggests "from tkinter import *", contradicting PEP8

2018-02-12 Thread Ned Deily
Ned Deily added the comment: PEP 8 also says: "In particular: do not break backwards compatibility just to comply with this PEP!" This is one of those cases. There is a ton of code out there that depends on importing tkinter this way for the reasons Serhiy cited. Thanks

[issue32830] tkinter documentation suggests "from tkinter import *", contradicting PEP8

2018-02-12 Thread ChrisRands
ChrisRands added the comment: Thanks Serhiy, you might be right (I am not a tkinter user myself). I also forgot to say that in PEP 328 tkinter is mentioned in this context: https://www.python.org/dev/peps/pep-0328/#rationale-for-parentheses --

[issue32830] tkinter documentation suggests "from tkinter import *", contradicting PEP8

2018-02-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think tkinter is a valid exception. It provides the enormous number of names (mostly constants like RIGHT or VERTICAL) which are convenient to use without prefix. PEP 8 is a style guide for the code of the stdlib. Its

[issue32830] tkinter documentation suggests "from tkinter import *", contradicting PEP8

2018-02-12 Thread ChrisRands
New submission from ChrisRands : 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