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: (good first issue) Tutorial 7.1 str.format() code example syntax error
Type: Stage: resolved
Components: Documentation Versions: Python 3.8, Python 3.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: Mariatta, Windson Yang, docs@python, oboff, terry.reedy
Priority: normal Keywords: easy, patch

Created on 2018-07-20 04:52 by oboff, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 8349 closed aaqaishtyaq, 2018-07-20 14:09
PR 8350 merged aaqaishtyaq, 2018-07-20 15:06
PR 8354 merged miss-islington, 2018-07-20 16:17
PR 11598 merged miss-islington, 2019-01-18 00:05
Messages (7)
msg321977 - (view) Author: Orlando (oboff) Date: 2018-07-20 04:52
Tutorial 7.1 str.format() example (https://docs.python.org/3.7/tutorial/inputoutput.html#fancier-output-formatting):

[1]yes_votes = 42_572_654 ; no_votes = 43_132_495
[2]percentage = (yes_votes/(yes_votes+no_votes)
[3]'{:-9} YES votes  {:2.2%}'.format(yes_votes, percentage))

Proposed Fix: 
Remove first open parens on line 2 and last close parens on line 3.
msg321980 - (view) Author: Mariatta (Mariatta) * (Python committer) Date: 2018-07-20 05:25
Yup. Are you interested in creating the PR?
msg321990 - (view) Author: Windson Yang (Windson Yang) * Date: 2018-07-20 09:07
Hi, Orlando, this link maybe useful: https://devguide.python.org/documenting/
msg321995 - (view) Author: Orlando (oboff) Date: 2018-07-20 10:26
Thanks, Mariatta and Windson. I'll make a PR for the change.
msg322025 - (view) Author: Mariatta (Mariatta) * (Python committer) Date: 2018-07-20 16:08
Thanks!
msg322035 - (view) Author: Mariatta (Mariatta) * (Python committer) Date: 2018-07-20 20:38
New changeset 49abd307d222e6fe85b5175eed6b6f87fc656a8d by Mariatta (Miss Islington (bot)) in branch '3.7':
bpo-34161: Remove extra parentheses in output formatting tutorial (GH-8350)
https://github.com/python/cpython/commit/49abd307d222e6fe85b5175eed6b6f87fc656a8d
msg333914 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2019-01-17 23:55
Sorry for the noise.  It seems like a bug to me that GitHub keeps a secret link to the original title and uses it in the merge box.
History
Date User Action Args
2022-04-11 14:59:03adminsetgithub: 78342
2019-01-18 00:05:33miss-islingtonsetpull_requests: + pull_request11315
2019-01-17 23:55:26terry.reedysetmessages: + msg333914
2019-01-17 23:52:14terry.reedysetmessages: - msg333912
2019-01-17 23:51:04terry.reedysetpull_requests: - pull_request11308
2019-01-17 23:50:45terry.reedysetpull_requests: - pull_request11309
2019-01-17 23:50:22terry.reedysetpull_requests: - pull_request11310
2019-01-17 23:45:04miss-islingtonsetpull_requests: + pull_request11310
2019-01-17 23:44:53miss-islingtonsetpull_requests: + pull_request11309
2019-01-17 23:44:41miss-islingtonsetpull_requests: + pull_request11308
2019-01-17 23:44:22terry.reedysetnosy: + terry.reedy
messages: + msg333912
2019-01-17 23:27:23terry.reedysetpull_requests: - pull_request11304
2019-01-17 23:27:10terry.reedysetpull_requests: - pull_request11305
2019-01-17 23:26:57terry.reedysetpull_requests: - pull_request11306
2019-01-17 23:24:54terry.reedysetpull_requests: + pull_request11306
2019-01-17 23:24:45terry.reedysetpull_requests: + pull_request11305
2019-01-17 23:24:38terry.reedysetpull_requests: + pull_request11304
2018-07-20 20:38:13Mariattasetmessages: + msg322035
2018-07-20 16:17:32miss-islingtonsetpull_requests: + pull_request7889
2018-07-20 16:08:10Mariattasetstatus: open -> closed
resolution: fixed
messages: + msg322025

stage: patch review -> resolved
2018-07-20 15:06:17aaqaishtyaqsetpull_requests: + pull_request7885
2018-07-20 14:09:15aaqaishtyaqsetkeywords: + patch
stage: needs patch -> patch review
pull_requests: + pull_request7884
2018-07-20 10:26:09oboffsetmessages: + msg321995
2018-07-20 09:07:27Windson Yangsetnosy: + Windson Yang
messages: + msg321990
2018-07-20 05:25:09Mariattasettitle: Tutorial 7.1 str.format() code example syntax error -> (good first issue) Tutorial 7.1 str.format() code example syntax error

keywords: + easy
nosy: + Mariatta
versions: + Python 3.8
messages: + msg321980
stage: needs patch
2018-07-20 04:52:03oboffcreate