classification
Title: Stale Python Language Reference docs (no walrus).
Type: Stage: resolved
Components: Documentation Versions: Python 3.10, Python 3.9, Python 3.8
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: brandtbucher, docs@python, emilyemorehouse, gvanrossum, miss-islington, shankarj67
Priority: normal Keywords: easy, patch

Created on 2020-03-05 21:54 by brandtbucher, last changed 2020-07-25 23:55 by gvanrossum. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 18793 merged brandtbucher, 2020-03-06 00:27
PR 18797 merged miss-islington, 2020-03-06 05:19
PR 18851 merged shankarj67, 2020-03-08 17:41
PR 21622 merged miss-islington, 2020-07-25 23:34
PR 21623 merged miss-islington, 2020-07-25 23:34
Messages (20)
msg363456 - (view) Author: Brandt Bucher (brandtbucher) * (Python committer) Date: 2020-03-05 21:54
It looks like https://docs.python.org/3/reference/expressions.html and https://docs.python.org/3/reference/compound_stmts.html were never updated for named expressions.

Because this change has to be backported, it's sort of a blocker for my PEP 614 doc updates in issue 39702, which need to use the missing node in 3.9 only (I'd rather have this get a clean backport now than a messy one later)!

Is somebody more familiar with PEP 572 willing to take this? Should be pretty straightforward.

Pinging Emily since it looks like you've done some grammar/doc work for this in the past.
msg363462 - (view) Author: SHANKAR JHA (shankarj67) * Date: 2020-03-05 23:46
Can I take this issue?
msg363464 - (view) Author: Brandt Bucher (brandtbucher) * (Python committer) Date: 2020-03-06 00:24
Sorry, I hadn't seen your comment... :(

I've already finished the grammar specification bit, but not the prose description of how assignment expressions work, etc.

How about I leave that empty in my PR and you can actually do the documentation part afterward that's merged? Cool? I'd be happy to review it.
msg363465 - (view) Author: SHANKAR JHA (shankarj67) * Date: 2020-03-06 00:43
Thank you for that!!!

Can you please provide some pointers to what exactly I have to do?
msg363467 - (view) Author: Brandt Bucher (brandtbucher) * (Python committer) Date: 2020-03-06 01:39
Of course. After my PR is merged, you can make another PR that replaces the ".. TODO: BPO-39868" line with a description of how assignment expressions work. Likely much of the language can be borrowed from the PEP.

Let me know if you need help with any of the steps. Have you written RST / made a CPython PR on GitHub before?
msg363473 - (view) Author: SHANKAR JHA (shankarj67) * Date: 2020-03-06 02:21
This is my first contribution to Python. This is why I am looking for some guidance, just point me to some resource, and then I will look into it thoroughly.

I am reading this https://www.python.org/dev/peps/pep-0572/ for better understanding.
msg363483 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2020-03-06 05:19
New changeset 8bae21962bab2fac7630982abd73676b89930902 by Brandt Bucher in branch 'master':
bpo-39868: Update Language Reference for PEP 572. (#18793)
https://github.com/python/cpython/commit/8bae21962bab2fac7630982abd73676b89930902
msg363484 - (view) Author: miss-islington (miss-islington) Date: 2020-03-06 05:25
New changeset 0c71770eeee9c1b19b6f146b56db5f10bab3f09c by Miss Islington (bot) in branch '3.8':
bpo-39868: Update Language Reference for PEP 572. (GH-18793)
https://github.com/python/cpython/commit/0c71770eeee9c1b19b6f146b56db5f10bab3f09c
msg363489 - (view) Author: Brandt Bucher (brandtbucher) * (Python committer) Date: 2020-03-06 06:49
Thanks for offering to help, Shankar! For this change, you can look at the other sections of the Doc/reference/expressions.rst file for an idea of what we're looking for. I think a few sentences and maybe a small code snippet should probably be fine.

The devguide has all of the information that you need to get started. Specifically, you'll want to look at:

- https://devguide.python.org/docquality/
- https://devguide.python.org/documenting/
- https://devguide.python.org/pullrequest/

Also, you should sign the CLA *as soon as possible* (https://www.python.org/psf/contrib/contrib-form/)!

Once you've made a PR, please request a review from me so I can make sure it moves along quickly. Let me know if you have any questions... I know it can be really tricky at first!
msg363507 - (view) Author: SHANKAR JHA (shankarj67) * Date: 2020-03-06 13:54
Thank you for helping me out brandtbucher.

As per my understanding, I am looking into the code (https://github.com/python/cpython/blob/master/Doc/reference/expressions.rst) and finding where the code doesn't follow the pattern described in (https://www.python.org/dev/peps/pep-0572/.)

Please let me know if I am correct so that I will quickly go through everything and send you a pull request as soon as possible.
msg363509 - (view) Author: SHANKAR JHA (shankarj67) * Date: 2020-03-06 14:05
I am also checking your commit for this: (https://github.com/python/cpython/commit/8bae21962bab2fac7630982abd73676b89930902) and see that you are changing the "expression: to "assignment_expression". 

Do I have to fill what assignment expression does with some examples?
msg363516 - (view) Author: SHANKAR JHA (shankarj67) * Date: 2020-03-06 14:50
I got it that I have to fill the "Assignment expression" section in the code. I am working on it and send you the for review once I am done.
msg363562 - (view) Author: Brandt Bucher (brandtbucher) * (Python committer) Date: 2020-03-06 21:56
Great. Just replacing the TODO line with your new description (and maybe an example) should be perfect!
msg363589 - (view) Author: SHANKAR JHA (shankarj67) * Date: 2020-03-07 10:27
I have created my draft with an example but I am confused about where exactly do I have to add the code and push it.

I have cloned these two repositories in my system and setup everything:
https://github.com/python/cpython
https://github.com/python/devguide

1. Please tell me where I should be adding my code. Do I have to add code here https://github.com/python/cpython/blob/master/Doc/reference/expressions.rst and push it?

2. I am working on the master branch only. Is there any specific branch I have to select?
msg363617 - (view) Author: Brandt Bucher (brandtbucher) * (Python committer) Date: 2020-03-07 22:15
> I have created my draft with an example but I am confused about where exactly do I have to add the code and push it.

> I have cloned these two repositories in my system and setup everything:
> https://github.com/python/cpython
> https://github.com/python/devguide

Great! It's not necessary to clone the devguide though; CPython is the only one you're going to edit.

Make sure you've "forked" the repo on GitHub, and are working on a local clone of your fork. Otherwise things will be trickier.

> 1. Please tell me where I should be adding my code. Do I have to add code here https://github.com/python/cpython/blob/master/Doc/reference/expressions.rst and push it?

Yes, you'll add the new documentation to line 1652, where the "TODO" comment is. You should make the changes in your own fork of the repo, and push. Then you'll be ready for a PR.

> 2. I am working on the master branch only. Is there any specific branch I have to select?

Working from master in your own fork is fine, but frequent contributors often prefer to branch from master and work on those branches instead.

The pages I've linked to in the devguide walk you through every step of making a PR (including an intro on how to use Git). If it's easier for you, though, you can attach a copy of your edits to this issue and I can make a PR on your behalf. I just wouldn't count on repeating that workflow if you plan on contributing in the future; regular contributors should feel comfortable branching, committing, opening a PR, etc.
msg363660 - (view) Author: SHANKAR JHA (shankarj67) * Date: 2020-03-08 13:30
I have added the pull request: https://github.com/python/cpython/pull/18851. Please check it out and let me know if I need to change anything.

Thank you everyone for your guidance.
msg374294 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2020-07-25 23:33
New changeset f117cef25b5ffc4db9fbe373ddb65e14f59f0397 by Shankar Jha in branch 'master':
bpo-39868: Add documentation for Assignment Expressions (walrus, PEP 572) (#18851)
https://github.com/python/cpython/commit/f117cef25b5ffc4db9fbe373ddb65e14f59f0397
msg374295 - (view) Author: miss-islington (miss-islington) Date: 2020-07-25 23:40
New changeset 616734b6c80e222f16249e9a9ce52588a0b611a7 by Miss Islington (bot) in branch '3.9':
bpo-39868: Add documentation for Assignment Expressions (walrus, PEP 572) (GH-18851)
https://github.com/python/cpython/commit/616734b6c80e222f16249e9a9ce52588a0b611a7
msg374296 - (view) Author: miss-islington (miss-islington) Date: 2020-07-25 23:41
New changeset 755cb49429581679fc7b12905cb3d3ecf439032c by Miss Islington (bot) in branch '3.8':
bpo-39868: Add documentation for Assignment Expressions (walrus, PEP 572) (GH-18851)
https://github.com/python/cpython/commit/755cb49429581679fc7b12905cb3d3ecf439032c
msg374297 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2020-07-25 23:55
Congratulations SHANKAR JHA. Thank you for your contribution.
History
Date User Action Args
2020-07-25 23:55:37gvanrossumsetstatus: open -> closed
versions: + Python 3.9, Python 3.10
messages: + msg374297

resolution: fixed
stage: patch review -> resolved
2020-07-25 23:41:23miss-islingtonsetmessages: + msg374296
2020-07-25 23:40:51miss-islingtonsetmessages: + msg374295
2020-07-25 23:34:20miss-islingtonsetpull_requests: + pull_request20764
2020-07-25 23:34:12miss-islingtonsetpull_requests: + pull_request20763
2020-07-25 23:33:51gvanrossumsetmessages: + msg374294
2020-03-08 17:41:10shankarj67setkeywords: + patch
stage: patch review
pull_requests: + pull_request18213
2020-03-08 13:30:19shankarj67setmessages: + msg363660
2020-03-07 22:15:24brandtbuchersetmessages: + msg363617
2020-03-07 10:27:55shankarj67setmessages: + msg363589
2020-03-06 21:56:03brandtbuchersetkeywords: - patch

messages: + msg363562
stage: patch review -> (no value)
2020-03-06 14:50:31shankarj67setmessages: + msg363516
2020-03-06 14:05:18shankarj67setmessages: + msg363509
2020-03-06 13:54:53shankarj67setmessages: + msg363507
2020-03-06 06:49:44brandtbuchersetmessages: + msg363489
2020-03-06 05:25:18miss-islingtonsetmessages: + msg363484
2020-03-06 05:19:35miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request18153
2020-03-06 05:19:25gvanrossumsetnosy: + gvanrossum
messages: + msg363483
2020-03-06 02:21:57shankarj67setmessages: + msg363473
2020-03-06 01:39:09brandtbuchersetmessages: + msg363467
2020-03-06 00:43:18shankarj67setmessages: + msg363465
2020-03-06 00:27:06brandtbuchersetkeywords: + patch
stage: patch review
pull_requests: + pull_request18151
2020-03-06 00:24:25brandtbuchersetmessages: + msg363464
2020-03-05 23:46:03shankarj67setnosy: + shankarj67
messages: + msg363462
2020-03-05 21:54:08brandtbuchercreate