This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Documentation-Tkinter Clarify module spelling change in Python 3 docs
Type: enhancement Stage: resolved
Components: Documentation, Tkinter Versions: Python 3.6, Python 3.4, Python 3.5
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: docs@python Nosy List: BreamoreBoy, Rishit Bansal, bar.harel, docs@python, martin.panter, terry.reedy, willingc
Priority: normal Keywords: easy, patch

Created on 2015-09-19 10:01 by Rishit Bansal, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
Issue25175.patch bar.harel, 2015-09-19 19:34 review
Messages (10)
msg251070 - (view) Author: Rishit Bansal (Rishit Bansal) Date: 2015-09-19 10:01
The statement required to check whether Tkinter is installed on a system is mentioned in the documentation as python -m tkinter , whereas it is supposed to be python -m Tkinter (with a big 't'). Please correct this error on the documentation here:https://docs.python.org/3/library/tkinter.html as it is very misleading to beginners.
msg251071 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2015-09-19 10:14
The problem here is you have quoted the Python 3 documentation (see in the title, or the version switcher at the top), when you are presumably using Python 2. The module changed name to lowercase in Python 3.
msg251079 - (view) Author: Carol Willing (willingc) * (Python committer) Date: 2015-09-19 13:08
Although the documentation for Python 3 and Python 2 is correct as Martin shared, adding a note about capitalization in the Python 3 docs would be helpful for beginners for two reasons: 1) the name of the Tkinter project does start with a capital 'T' and 2) the python module name changed from Python 2 to 3.

Adding a note that the spelling of the module changed in version 3 to 'tkinter' from version 2's 'Tkinter' would be helpful for new users (especially since Tkinter is often used in educational applications).

I have updated the issue title, issue type, stage, and keywords to reflect that this issue is not a documentation error but a helpful, user friendly documentation enhancement.
msg251109 - (view) Author: Bar Harel (bar.harel) * Date: 2015-09-19 19:34
Is this good? :-)
msg251121 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2015-09-19 22:06
Normally the documentation doesn’t mention changes from Python 2. But in this case one often has to rely on other sources of documentation, which are often about Python 2, so I think the notice might be reasonable.
msg251131 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2015-09-20 00:37
Does this open a can of worms?  "You did it for Tkinter, why not do it for everything that was changed by PEP3108"?
msg251134 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2015-09-20 01:23
Perhaps it would be better to add the notice inside the big “See also” box at the top. In particular I occasionally find myself looking at the NMT “Tkinter reference: a GUI for Python” and Effbot sites as a substitute for the missing built-in documentation, and both these are written for Python 2. On the other hand, the TkDocs site is also useful, and seem to use Python 3.
msg251135 - (view) Author: Carol Willing (willingc) * (Python committer) Date: 2015-09-20 01:47
Thank you Bar Harel for submitting a patch.

Ultimately, I believe that the wording should be what is most helpful for the end users.

If you wish to avoid mentioning Python 2, then a simple note cautioning the user to take care that the case of the module should match the user's Python version. 

"Note: Python 3 uses all lowercase for the 'tkinter' module. Earlier versions of Python used 'Tkinter'. Please take care to use the correct module name that corresponds to the Python version being used."
msg251615 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2015-09-25 21:21
Martin> Normally the documentation doesn’t mention changes from Python 2

Right: forward notes in 2.7 doc, no backward notes in 3.x doc. The 2.7 doc has near the top "Note: Tkinter has been renamed to tkinter in Python 3. The 2to3 tool will automatically adapt imports when converting your sources to Python 3."  Perhaps this should be expanded to mention the other tkinter imports.

We collectively agreed that adding backward notes in 3.x docs is not needed for beginners who start with 3.x, and would actively confuse them with information most do not need. I think breaking this rule requires agreement of more than the nosy list here: at minimum, Georg Brandl and Serhiy Storchaka, but better pydev.

There are still occasional issues about removing 2.x mentions or, more likely now, revising leftover 2.x examples.  The OP is complaining about an example that was properly revised.  If a new 2.x note were added, someone might come along and remove it.

I agree with
Mark> Does this open a can of worms?
Just for tkinter, there is also "import tkFont" (2.x) versus "import tkinter.font" (3.x) and similar for other stuff in the 'tkinter' package.  Consequently, the proposed note is incomplete.

Carol> the Tkinter project does start with a capital 'T'
I am not aware of a 'Tkinter project' separate from the tkinter module in the stdlib, maintained by various people, though current mostly by Serhiy.  In any case, the Python project starts with 'P' while the python binaries start with 'p'.

The OP simply made a mistake; there is no bug in the 3.x doc.  The tkinter package (unlike idlelib) follows 3.x rules.  I think the issue should have been closed immediately as 'not a bug', and should be so closed now.
msg252314 - (view) Author: Bar Harel (bar.harel) * Date: 2015-10-05 10:13
I guess you're correct, a simple mistake one time mistake shouldn't require the changing of the docs.
History
Date User Action Args
2022-04-11 14:58:21adminsetgithub: 69362
2015-10-05 18:55:25terry.reedysetstatus: open -> closed
resolution: not a bug
stage: patch review -> resolved
2015-10-05 10:13:54bar.harelsetmessages: + msg252314
2015-09-25 21:21:45terry.reedysetnosy: + terry.reedy
messages: + msg251615
2015-09-20 01:47:28willingcsetmessages: + msg251135
2015-09-20 01:23:43martin.pantersetmessages: + msg251134
2015-09-20 00:37:37BreamoreBoysetnosy: + BreamoreBoy
messages: + msg251131
2015-09-19 22:06:24martin.pantersetstage: needs patch -> patch review
messages: + msg251121
components: + Tkinter
versions: + Python 3.4, - Python 2.7
2015-09-19 19:34:47bar.harelsetfiles: + Issue25175.patch

nosy: + bar.harel
messages: + msg251109

keywords: + patch
2015-09-19 13:08:40willingcsettype: compile error -> enhancement
title: Documentation-Tkinter wrong statement -> Documentation-Tkinter Clarify module spelling change in Python 3 docs

keywords: + easy
nosy: + willingc
versions: + Python 3.5, Python 3.6
messages: + msg251079
stage: needs patch
2015-09-19 10:14:47martin.pantersetnosy: + martin.panter
messages: + msg251071
2015-09-19 10:01:04Rishit Bansalcreate