[issue40552] Enhance for loop and copy example in tutorial
New submission from Julien Palard <julien+python@palard.fr>: During the past few weeks we got two reports of an example not working in the tutorial: [1], [2]. [1]: https://mail.python.org/archives/list/docs@python.org/message/ZJM3S2TE5UPFYI... [2]: https://mail.python.org/archives/list/docs@python.org/thread/6FZ55HTMILK4P6E... 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. ---------- assignee: docs@python components: Documentation keywords: easy messages: 368373 nosy: docs@python, mdk priority: low severity: normal status: open title: Enhance for loop and copy example in tutorial type: enhancement _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue40552> _______________________________________
Change by Antoine Wecxsteen <antoine@wecxsteen.net>: ---------- keywords: +patch nosy: +awecx nosy_count: 2.0 -> 3.0 pull_requests: +19309 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19992 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue40552> _______________________________________
Antoine Wecxsteen <antoine@wecxsteen.net> added the comment: I've issued https://github.com/python/cpython/pull/19992. I've changed the names mdk suggested to give an example of using non-ascii characters. ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue40552> _______________________________________
Joannah Nanjekye <nanjekyejoannah@gmail.com> added the comment: New changeset 6fad3e6b49f6a9f8b8a6635c41371e4451479f86 by Antoine in branch 'master': bpo-40552 Add 'users' variable in code sample (tutorial 4.2). (GH-19992) https://github.com/python/cpython/commit/6fad3e6b49f6a9f8b8a6635c41371e44514... ---------- nosy: +nanjekyejoannah _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue40552> _______________________________________
Joannah Nanjekye <nanjekyejoannah@gmail.com> added the comment: Thanks for the PR Antoine Wecxsteen. I will close this. ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue40552> _______________________________________
participants (3)
-
Antoine Wecxsteen -
Joannah Nanjekye -
Julien Palard