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.
Created on 2008年09月16日 21:05 by kirill_simonov, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| 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 turtle.py which needs a decision and which I've just posted to Python-dev Regards, Gregor |
|||
| msg73576 - (view) | Author: Kirill Simonov (kirill_simonov) | Date: 2008年09月22日 13:41 | |
Thank you for the fix, I really appeciate it. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:56:39 | admin | set | github: 48134 |
| 2008年09月22日 13:41:55 | kirill_simonov | set | messages: + msg73576 |
| 2008年09月21日 22:26:52 | gregorlingl | set | messages: + msg73538 |
| 2008年09月21日 07:58:16 | georg.brandl | set | nosy:
+ georg.brandl messages: + msg73501 |
| 2008年09月21日 07:32:33 | loewis | set | status: open -> closed resolution: fixed messages: + msg73495 |
| 2008年09月20日 17:53:38 | gvanrossum | set | assignee: gvanrossum -> loewis messages: + msg73467 |
| 2008年09月20日 16:19:49 | loewis | set | status: 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:09 | brett.cannon | set | status: pending -> closed messages: + msg73318 |
| 2008年09月16日 21:16:19 | benjamin.peterson | set | status: open -> pending assignee: brett.cannon resolution: rejected messages: + msg73314 nosy: + brett.cannon, benjamin.peterson |
| 2008年09月16日 21:05:37 | kirill_simonov | create | |