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: Minor parameter documentation mismatch for turtle
Type: Stage: resolved
Components: Documentation Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: Shane Smith, Windson Yang, docs@python, eric.araujo, ezio.melotti, miss-islington, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2018-11-14 20:40 by Shane Smith, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 10565 merged thatiparthy, 2018-11-16 09:59
"btn" in turtle docs. (GH-10565)">PR 10571 merged miss-islington, 2018-11-16 13:29
"btn" in turtle docs. (GH-10565)">PR 10572 merged miss-islington, 2018-11-16 13:29
"btn" in turtle docs. (GH-10565).">PR 10943 merged serhiy.storchaka, 2018-12-05 20:00
Messages (6)
msg329932 - (view) Author: Shane (Shane Smith) Date: 2018-11-14 20:40
I noticed a slight mismatch in the parameter documentation for one of turtle's functions.  onclick() accepts the parameters (fun, btn, add), but the documentation describes the parameters (fun, num, add).  A minor issue, to be sure, but I wanted to point it out since I just noticed it.  I'm using Python 3.7.1 but I suspect it's not isolated to that.

>>> help(turtle.Turtle().onclick)
Help on method onclick in module turtle:

onclick(fun, btn=1, add=None) method of turtle.Turtle instance
    Bind fun to mouse-click event on this turtle on canvas.
    
    Arguments:
    fun --  a function with two arguments, to which will be assigned
            the coordinates of the clicked point on the canvas.
    num --  number of the mouse-button defaults to 1 (left mouse button).
    add --  True or False. If True, new binding will be added, otherwise
            it will replace a former binding.
msg329980 - (view) Author: Windson Yang (Windson Yang) * Date: 2018-11-16 05:33
Yes, you are right. A quick fix would change 'num' to 'btn' in parameters in
 https://docs.python.org/3.3/library/turtle.html?highlight=turtle#turtle.onclick. I think they are the same thing. Do you want to create a patch?
msg329997 - (view) Author: miss-islington (miss-islington) Date: 2018-11-16 13:55
New changeset 0461c3b635d53e8e75145695803a2fca288a1689 by Miss Islington (bot) in branch '3.7':
bpo-35250: Correct argument name "num" -> "btn" in turtle docs. (GH-10565)
https://github.com/python/cpython/commit/0461c3b635d53e8e75145695803a2fca288a1689
msg329998 - (view) Author: miss-islington (miss-islington) Date: 2018-11-16 13:56
New changeset 8856246c41b0663bfe8d3af7d52a7c337e25572d by Miss Islington (bot) in branch '3.6':
bpo-35250: Correct argument name "num" -> "btn" in turtle docs. (GH-10565)
https://github.com/python/cpython/commit/8856246c41b0663bfe8d3af7d52a7c337e25572d
msg330009 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2018-11-16 18:30
There is an HTML escaping problem in the PR list!
msg331167 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2018-12-05 21:10
New changeset abe74feb912292aa4df4e70d39e85d0bcd425436 by Serhiy Storchaka in branch '2.7':
[2.7] bpo-35250: Correct argument name "num" -> "btn" in turtle docs. (GH-10565). (GH-10943)
https://github.com/python/cpython/commit/abe74feb912292aa4df4e70d39e85d0bcd425436
History
Date User Action Args
2022-04-11 14:59:08adminsetgithub: 79431
2018-12-05 21:14:51serhiy.storchakasetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2018-12-05 21:10:38serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg331167
2018-12-05 20:00:56serhiy.storchakasetpull_requests: + pull_request10195
2018-11-16 18:30:00eric.araujosetnosy: + eric.araujo, ezio.melotti
messages: + msg330009
2018-11-16 13:56:36miss-islingtonsetmessages: + msg329998
2018-11-16 13:55:16miss-islingtonsetnosy: + miss-islington
messages: + msg329997
2018-11-16 13:29:18miss-islingtonsetpull_requests: + pull_request9820
2018-11-16 13:29:05miss-islingtonsetpull_requests: + pull_request9819
2018-11-16 09:59:04thatiparthysetkeywords: + patch
stage: patch review
pull_requests: + pull_request9814
2018-11-16 05:33:00Windson Yangsetnosy: + Windson Yang
messages: + msg329980
2018-11-14 20:40:45Shane Smithcreate