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: Enhance for loop and copy example in tutorial
Type: enhancement Stage: resolved
Components: Documentation Versions:
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: awecx, docs@python, mdk, nanjekyejoannah
Priority: low Keywords: easy, patch

Created on 2020-05-07 20:48 by mdk, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 19992 merged awecx, 2020-05-08 09:46
Messages (4)
msg368373 - (view) Author: Julien Palard (mdk) * (Python committer) Date: 2020-05-07 20:48
During the past few weeks we got two reports of an example not working in the tutorial: [1], [2].


Problem is: the example uses a `users` variable that is not defined.

users should be a dict, which is not straightforward for newcomers neither, so I propose to define it to:

    users = {"Hans": "active", "Andrea": "inactive", "Nils": "active"}

in the example, to make it work.
msg368431 - (view) Author: Antoine Wecxsteen (awecx) * Date: 2020-05-08 09:49
I've issued

I've changed the names mdk suggested to give an example of using non-ascii characters.
msg369674 - (view) Author: Joannah Nanjekye (nanjekyejoannah) * (Python committer) Date: 2020-05-23 00:29
New changeset 6fad3e6b49f6a9f8b8a6635c41371e4451479f86 by Antoine in branch 'master':
bpo-40552 Add 'users' variable in code sample (tutorial 4.2). (GH-19992)
msg369677 - (view) Author: Joannah Nanjekye (nanjekyejoannah) * (Python committer) Date: 2020-05-23 00:34
Thanks for the PR Antoine Wecxsteen. I will close this.
Date User Action Args
2022-04-11 14:59:30adminsetgithub: 84732
2020-05-23 00:34:08nanjekyejoannahsetstatus: open -> closed

messages: + msg369677
stage: patch review -> resolved
2020-05-23 00:29:41nanjekyejoannahsetnosy: + nanjekyejoannah
messages: + msg369674
2020-05-08 09:49:18awecxsetmessages: + msg368431
2020-05-08 09:46:45awecxsetkeywords: + patch
nosy: + awecx

pull_requests: + pull_request19309
stage: patch review
2020-05-07 20:48:23mdkcreate