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.

Title: turtle in the tkinter package?
Type: enhancement Stage:
Components: Library (Lib) Versions: Python 3.0
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: loewis Nosy List: benjamin.peterson, brett.cannon, georg.brandl, glingl, gregorlingl, gvanrossum, kirill_simonov, loewis
Priority: release blocker Keywords: patch

Created on 2008-09-16 21:05 by kirill_simonov, last changed 2022-04-11 14:56 by admin. This issue is now closed.

File name Uploaded Description Edit
turtle.diff loewis, 2008-09-20 16:19
Messages (9)
msg73311 - (view) Author: Kirill Simonov (kirill_simonov) Date: 2008-09-16 21:05
I wonder why the module 'turtle' was moved to the 'tkinter' package.  It
is not a part of Tk, it does not provide new or extend existing tkinter
API.  While it uses tkinter, so do pydoc or idle; this is just an
implementation detail.  If some day a new GUI library replaces tkinter
in the standard Python library, turtle's interface will not have to be
changed, only the implementation.  Moreover this change unnecessarily
breaks all existing demos and tutorials that use turtle.  Why do this if
it does not give any substantial benefits?  Finally, 'import turtle' is
easier than 'from tkinter import turtle' for complete newbies in
programming, who are the primary users of this module.

So I propose to keep turtle a top-level module as it was in Python 1 and 2.
msg73314 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2008-09-16 21:16
Unfortunately, as we are approaching 3.0rc1, it is too late to make a
change like this. I'm assigning this to Brett if he has an opinion, but
I don't expect this change to be able to happen.
msg73318 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2008-09-16 22:31
As Benjamin said, it's too late in the release cycle to change this.

Plus turtle is entirely Tk-dependent so putting in the package makes
sense to me. It also isn't important enough to be a top-level package.
Finally, I disagree that telling a newbie to type ``from tkinter import
turtle`` is any more difficult than to tell them to type ``import
tkinter``; if they don't know about importing then either form won't
make sense to them.
msg73465 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2008-09-20 16:19
I'd like to appeal that decision. That the turtle module is implemented
in Tkinter is, well, an implementation detail. What matters to the end
user is the turtle API, which has little to do with Tkinter (at least,
the most high-level API doesn't).

I think it is a mistake to have the module in the tkinter package, hence
I marked this bug release-critical, and would like to ask that this is
reconsidered before rc2 (clearly, when 3.0 is released, this mistake
cannot be corrected easily anymore).

In considering this issue, please understand the target audience of the
turtle module: children that just learn programming. I completely agree
with Kirill (and also with Gregor Lingl, who complained about this also,
but didn't follow up). For these people, stability of documentation is
much more important than for trained programmers: when they get an
import error, they consider all kinds of problems (such as them having
mistyped things, or the computer being broken and the module being
missing); the real cause (arbitrary renaming) doesn't come to their mind
as the first thing.

Attached is a patch that has the necessary changes.

Guido, would you be willing to pronounce?
msg73467 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2008-09-20 17:53
Agreed. It's toplevel in 2.6. Let's keep it toplevel in 3.x.
msg73495 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2008-09-21 07:32
This is now fixed in r66531.
msg73501 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2008-09-21 07:58
Docs done in r66534.
msg73538 - (view) Author: Gregor Lingl (gregorlingl) Date: 2008-09-21 22:26
Of course I highly appreciate this decision.

I'd like to point you to an urgent issue concerning
which needs a decision and which I've just posted to Python-dev

msg73576 - (view) Author: Kirill Simonov (kirill_simonov) Date: 2008-09-22 13:41
Thank you for the fix, I really appeciate it.
Date User Action Args
2022-04-11 14:56:39adminsetgithub: 48134
2008-09-22 13:41:55kirill_simonovsetmessages: + msg73576
2008-09-21 22:26:52gregorlinglsetmessages: + msg73538
2008-09-21 07:58:16georg.brandlsetnosy: + georg.brandl
messages: + msg73501
2008-09-21 07:32:33loewissetstatus: open -> closed
resolution: fixed
messages: + msg73495
2008-09-20 17:53:38gvanrossumsetassignee: gvanrossum -> loewis
messages: + msg73467
2008-09-20 16:19:49loewissetstatus: closed -> open
files: + turtle.diff
assignee: brett.cannon -> gvanrossum
keywords: + patch
nosy: + glingl, gregorlingl, gvanrossum, loewis
messages: + msg73465
resolution: rejected -> (no value)
priority: release blocker
2008-09-16 22:31:09brett.cannonsetstatus: pending -> closed
messages: + msg73318
2008-09-16 21:16:19benjamin.petersonsetstatus: open -> pending
assignee: brett.cannon
resolution: rejected
messages: + msg73314
nosy: + brett.cannon, benjamin.peterson
2008-09-16 21:05:37kirill_simonovcreate