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: examples code output do not match the current version 3.9
Type: behavior Stage: resolved
Components: Documentation Versions: Python 3.11, Python 3.10, Python 3.9
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, meowmeowmeowcat, miss-islington, terry.reedy, yangqing
Priority: normal Keywords: patch

Created on 2021-08-13 06:32 by yangqing, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 27755 merged meowmeowmeowcat, 2021-08-13 10:19
PR 27763 merged miss-islington, 2021-08-13 23:41
PR 27764 merged miss-islington, 2021-08-13 23:41
Messages (7)
msg399493 - (view) Author: 杨青 (yangqing) Date: 2021-08-13 06:32
https://docs.python.org/3/tutorial/controlflow.html

I got like this following:
TypeError: function() got multiple values for argument 'a'
not:
TypeError: function() got multiple values for keyword argument 'a'

>>> def function(a):
...     pass
...
>>> function(0, a=0)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: function() got multiple values for keyword argument 'a'
msg399515 - (view) Author: meowmeowcat (meowmeowmeowcat) * Date: 2021-08-13 10:15
Thanks! Confirmed with Python 3.9.2. I will open a PR for fixing this.
msg399571 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2021-08-13 23:39
Example here is in 
https://docs.python.org/3/tutorial/controlflow.html#default-argument-values
2 more in PR in
https://docs.python.org/3/tutorial/controlflow.html#function-examples

I confirmed that message is same in 3.10 and 3.11.
msg399572 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2021-08-13 23:41
New changeset ed524b4569b1e4a166886c880018418d46284378 by meowmeowmeowcat in branch 'main':
bpo-44907: Update error messages in tutorial examples (GH-27755)
https://github.com/python/cpython/commit/ed524b4569b1e4a166886c880018418d46284378
msg399573 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2021-08-14 00:25
New changeset 25122b2cf9b55f67572dd454b6809e1f62f78f39 by Miss Islington (bot) in branch '3.10':
bpo-44907: Update error messages in tutorial examples (GH-27755)
https://github.com/python/cpython/commit/25122b2cf9b55f67572dd454b6809e1f62f78f39
msg399574 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2021-08-14 00:25
New changeset 43bab0537ceb6e2ca3597f8f3a3c79733b897434 by Miss Islington (bot) in branch '3.9':
bpo-44907: Update error messages in tutorial examples (GH-27755)
https://github.com/python/cpython/commit/43bab0537ceb6e2ca3597f8f3a3c79733b897434
msg399575 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2021-08-14 00:27
Thanks both of you for the fix and clean patch.

I wonder if doctest should have picked up these, but this would be another issue.
History
Date User Action Args
2022-04-11 14:59:48adminsetgithub: 89070
2021-08-14 00:27:19terry.reedysetstatus: open -> closed
resolution: fixed
messages: + msg399575

stage: patch review -> resolved
2021-08-14 00:25:41terry.reedysetmessages: + msg399574
2021-08-14 00:25:29terry.reedysetmessages: + msg399573
2021-08-13 23:41:30terry.reedysetmessages: + msg399572
2021-08-13 23:41:24miss-islingtonsetpull_requests: + pull_request26240
2021-08-13 23:41:20miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request26239
2021-08-13 23:39:22terry.reedysetversions: + Python 3.10, Python 3.11
nosy: + terry.reedy

messages: + msg399571

type: behavior
2021-08-13 10:19:40meowmeowmeowcatsetkeywords: + patch
stage: patch review
pull_requests: + pull_request26231
2021-08-13 10:16:02meowmeowmeowcatsettitle: examples code output do not macth the current version 3.9 -> examples code output do not match the current version 3.9
2021-08-13 10:15:21meowmeowmeowcatsetnosy: + meowmeowmeowcat
messages: + msg399515
2021-08-13 06:32:57yangqingcreate