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: Brackets and Parentheses used in an ambiguous way
Type: enhancement Stage: resolved
Components: Documentation Versions: Python 3.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: Mariatta, docs@python, emilyemorehouse, kandhan, r.david.murray, steven.daprano
Priority: normal Keywords: patch

Created on 2017-12-30 05:11 by kandhan, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 5079 merged emilyemorehouse, 2018-01-01 23:59
PR 5081 merged python-dev, 2018-01-02 01:36
PR 5082 merged python-dev, 2018-01-02 01:37
Messages (11)
msg309216 - (view) Author: kandhan (kandhan) Date: 2017-12-30 05:11
https://docs.python.org/3/tutorial/classes.html

9.10. Generator Expressions

Some simple generators can be coded succinctly as expressions using a syntax similar to list comprehensions but with "parentheses instead of brackets"

Since parentheses comes under brackets, brackets could be changed to "Square Brackets"
msg309218 - (view) Author: kandhan (kandhan) Date: 2017-12-30 05:15
In the above comment,

Line 1 is the URL where it needs improvement

Line 2 and 3 are the actual content in the page that needs improvement

Line 4 is the proposed solution
msg309221 - (view) Author: Steven D'Aprano (steven.daprano) * (Python committer) Date: 2017-12-30 06:31
In British, Australian, New Zealander, and Indian English (and sometimes Canada), at least, "bracket" on its own typically means round brackets () and is rarely if ever used for square brackets [] or curly brackets {} without the adjective.

See for example https://english.stackexchange.com/questions/168762/brackets-vs-parenthesis for a discussion.

Consequently, the phrase "parentheses instead of brackets" reads to us as "parentheses instead of parentheses" would to Americans. In other words, weird and requiring a moment (or three) of thought to translate.

I support the suggested change to "parentheses instead of square brackets" -- it should read more naturally to people in the British Commonwealth and (I hope) shouldn't look too strange to Americans.

My personal preference would be for "round brackets instead of square brackets", but I guess that will be a battle I have no hope of winning *wink*
msg309222 - (view) Author: kandhan (kandhan) Date: 2017-12-30 07:16
"round brackets instead of square brackets" sounds better.

Its simple and direct and doesn't require any extra operations other than the required one.
msg309259 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2017-12-30 21:14
"round brackets" would require just as much thought (if not more...it's not a thing at all in American typographical language) for an American to understand as the unadorned bracket does for the rest of you, so the best compromise is "parenthesis instead of square brackets", since parenthesis is used elsewhere in the docs.
msg309355 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2018-01-02 01:34
New changeset f190eb59e60e2ae7a7cbd396458389a7a076e0d3 by R. David Murray (Emily Morehouse) in branch 'master':
bpo-32452: clarify term 'brackets' in generator tutorial (#5079)
https://github.com/python/cpython/commit/f190eb59e60e2ae7a7cbd396458389a7a076e0d3
msg309370 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2018-01-02 13:36
New changeset f24c1857a8a1ba3efb3f957d43371bc9499e3c86 by R. David Murray (Miss Islington (bot)) in branch '3.6':
bpo-32452: clarify term 'brackets' in generator tutorial (GH-5079) (#5081)
https://github.com/python/cpython/commit/f24c1857a8a1ba3efb3f957d43371bc9499e3c86
msg309371 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2018-01-02 13:40
It looks like the docs job hung on the 2.7 backport, but I don't see how to restart it.
msg309375 - (view) Author: Mariatta (Mariatta) * (Python committer) Date: 2018-01-02 15:23
I clicked the "Details" link and restarted the build from there.
Closing and reopening the PR will also restart the build.
msg309379 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2018-01-02 15:42
New changeset 0e0d1017a4c8ad6f77ee42d7b640463058037f62 by R. David Murray (Miss Islington (bot)) in branch '2.7':
bpo-32452: clarify term 'brackets' in generator tutorial (GH-5079) (#5082)
https://github.com/python/cpython/commit/0e0d1017a4c8ad6f77ee42d7b640463058037f62
msg309380 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2018-01-02 15:52
Thanks, Mariatta.  I did click on the details link, so either the restart link isn't obvious or I don't have the correct permissions to do a restart :)

And thanks Emily for doing the PR.
History
Date User Action Args
2022-04-11 14:58:56adminsetgithub: 76633
2018-01-02 15:52:28r.david.murraysetstatus: open -> closed
resolution: fixed
messages: + msg309380

stage: patch review -> resolved
2018-01-02 15:42:17r.david.murraysetmessages: + msg309379
2018-01-02 15:23:11Mariattasetnosy: + Mariatta
messages: + msg309375
2018-01-02 13:40:08r.david.murraysetmessages: + msg309371
2018-01-02 13:36:12r.david.murraysetmessages: + msg309370
2018-01-02 01:37:07python-devsetpull_requests: + pull_request4957
2018-01-02 01:36:07python-devsetpull_requests: + pull_request4956
2018-01-02 01:34:57r.david.murraysetmessages: + msg309355
2018-01-02 00:03:34emilyemorehousesetnosy: + emilyemorehouse
2018-01-01 23:59:21emilyemorehousesetkeywords: + patch
stage: patch review
pull_requests: + pull_request4954
2017-12-30 21:14:03r.david.murraysetnosy: + r.david.murray
messages: + msg309259
2017-12-30 07:16:12kandhansetmessages: + msg309222
2017-12-30 06:31:35steven.dapranosetnosy: + steven.daprano
messages: + msg309221
2017-12-30 05:15:11kandhansetmessages: + msg309218
2017-12-30 05:11:56kandhancreate