classification
Title: turtle: Errors in docstrings of onkey and onkeypress
Type: behavior Stage: resolved
Components: Documentation, Library (Lib) Versions: Python 3.2, Python 3.3, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, gregorlingl, petri.lehtinen, python-dev, smichr
Priority: normal Keywords: easy

Created on 2011-11-20 15:15 by smichr, last changed 2011-12-03 08:21 by smichr. This issue is now closed.

Messages (8)
msg147995 - (view) Author: Christopher Smith (smichr) Date: 2011-11-20 15:15
The docstring example is written using onkey instead of onkeyrelease.
msg148169 - (view) Author: Petri Lehtinen (petri.lehtinen) * (Python committer) Date: 2011-11-23 06:30
onkey and onkeyrelease are the same function, so you still get exactly the same behavior with the example in the docstring. This also makes it hard to have different docstrings for them.

Closing as wontfix.
msg148178 - (view) Author: Christopher Smith (smichr) Date: 2011-11-23 09:49
Sorry for the misdirection:

The docstring example for onkeypress is written using onkey instead of onkeypress. (There is no problem for onkey and onkeyrelease.)
msg148203 - (view) Author: Petri Lehtinen (petri.lehtinen) * (Python committer) Date: 2011-11-23 19:58
There are actually many problems with docstrings of both onkey() and onkeypress().

Both:

- "Turtle instance named turtle" isn't used in the example

- The repl/doctest syntax is weird

onkeypress only:

- "key-press event" vs. "key-press-event"

- The example uses onkey() instead of onkeypress()

- The bottom comment says that the example draws a hexagon, but it actually draws a straight line.
msg148205 - (view) Author: Petri Lehtinen (petri.lehtinen) * (Python committer) Date: 2011-11-23 20:01
The problems with onkey() are also there in 2.7. onkeypress() is new in 3.x.
msg148772 - (view) Author: Roundup Robot (python-dev) Date: 2011-12-02 19:28
New changeset 6e03ab9950f6 by Petri Lehtinen in branch '2.7':
Issue #13439: Fix many errors in turtle docstrings.
http://hg.python.org/cpython/rev/6e03ab9950f6

New changeset cc559e1e3bd8 by Petri Lehtinen in branch '3.2':
Issue #13439: Fix many errors in turtle docstrings.
http://hg.python.org/cpython/rev/cc559e1e3bd8

New changeset 8d60c1c89105 by Petri Lehtinen in branch 'default':
Issue #13439: Merge branch 3.2
http://hg.python.org/cpython/rev/8d60c1c89105
msg148773 - (view) Author: Petri Lehtinen (petri.lehtinen) * (Python committer) Date: 2011-12-02 19:29
Fixed, thanks!
msg148787 - (view) Author: Christopher Smith (smichr) Date: 2011-12-03 08:21
> resolution:  -> fixed
> stage: needs patch -> committed/rejected
> status: open -> closed
>

Nice to see a good thing get even better. Thanks for you work.

Chris Smith
History
Date User Action Args
2011-12-03 08:21:36smichrsetmessages: + msg148787
2011-12-02 19:29:30petri.lehtinensetstatus: open -> closed
resolution: fixed
messages: + msg148773

stage: needs patch -> resolved
2011-12-02 19:28:36python-devsetnosy: + python-dev
messages: + msg148772
2011-11-23 20:01:49petri.lehtinensetkeywords: + easy

stage: needs patch
messages: + msg148205
versions: + Python 2.7
2011-11-23 19:58:43petri.lehtinensettitle: turtle docstring for onkeyrelease references onkey, not onkeyrelease -> turtle: Errors in docstrings of onkey and onkeypress
messages: + msg148203
stage: resolved -> (no value)
2011-11-23 09:49:14smichrsetstatus: closed -> open
resolution: wont fix -> (no value)
messages: + msg148178
2011-11-23 06:30:41petri.lehtinensetstatus: open -> closed

resolution: wont fix

assignee: docs@python
stage: resolved
versions: + Python 3.3
nosy: + gregorlingl, docs@python
messages: + msg148169
components: + Documentation
type: behavior
2011-11-23 04:52:08petri.lehtinensetnosy: + petri.lehtinen
2011-11-20 15:15:23smichrcreate