bpo-36144: Document PEP 584. #18659
bpo-36144: Document PEP 584. #18659
Conversation
| @@ -4392,6 +4392,22 @@ pairs within braces, for example: ``{'jack': 4098, 'sjoerd': 4127}`` or ``{4098: | |||
| >>> d.values() == d.values() | |||
| False | |||
|
|
|||
| .. method:: d | other | |||
gvanrossum
Feb 26, 2020
Member
Maybe use ‘describe’ instead of‘method’. (What do the docs for ‘set’ use?)
Maybe use ‘describe’ instead of‘method’. (What do the docs for ‘set’ use?)
brandtbucher
Feb 26, 2020
Author
Member
set uses method, but it lists both the method and operator together. I agree that describe is probably better here.
set uses method, but it lists both the method and operator together. I agree that describe is probably better here.
| Merge (``|``) and update (``|=``) operators have been added to the built-in | ||
| :class:`dict` class. | ||
|
|
||
| .. XXX The rest is just a copy-paste of the PEP's Specification section. |
gvanrossum
Feb 26, 2020
Member
Maybe drop the rest and link to the PEP instead? The comment above praises brevity. :-)
Maybe drop the rest and link to the PEP instead? The comment above praises brevity. :-)
brandtbucher
Feb 26, 2020
Author
Member
I think the brevity bit is about the summary section, no? I latched onto "Do not spend very much time on the wording of your changes"... hence, the copy-paste. But you're right that it probably does not add much here.
I think the brevity bit is about the summary section, no? I latched onto "Do not spend very much time on the wording of your changes"... hence, the copy-paste. But you're right that it probably does not add much here.
| Merge (``|``) and update (``|=``) operators have been added to the built-in | ||
| :class:`dict` class. | ||
|
|
||
| .. XXX https://www.python.org/dev/peps/pep-0584/ |
gvanrossum
Feb 26, 2020
Member
I'm not sure why you would want to keep a full link to the PEP in a comment. Do other sections do this?
I'm not sure why you would want to keep a full link to the PEP in a comment. Do other sections do this?
brandtbucher
Feb 26, 2020
Author
Member
I misunderstood your prior review comment!
I misunderstood your prior review comment!
| Merge (``|``) and update (``|=``) operators have been added to the built-in | ||
| :class:`dict` class. | ||
|
|
||
| .. XXX https://www.python.org/dev/peps/pep-0584/ | ||
| See :pep:`584` for a full description. | ||
|
|
||
| (Contributed by Brandt Bucher in :issue:`36144`.) |
gvanrossum
Feb 26, 2020
Member
Hm, looking at the rendered docs, and comparing other sections, I wonder if this shouldn't just be a single paragraph.
Hm, looking at the rendered docs, and comparing other sections, I wonder if this shouldn't just be a single paragraph.
|
@gvanrossum I'm a bit confused. Looking at the "New Features" section of the What's New for 3.8, I see somewhat detailed docs with examples spread across several paragraphs (for example, for assignment expressions and positional-only parameters). The smaller, non-PEP items below are more compact though. However, I'm probably overthinking this, which is exactly what the comments at the top warn against. I'll just keep the short version and the notes in one paragraph, as you suggest, and Łukasz or whoever will go back later and expand as needed, then? |
|
It's true, we could add more. But the feature is so simple, I think it doesn't need more. (It's not new syntax.) |
|
I'll land it now. If you feel regrets later (or someone else thinks the whatsnew section on dict|dict should have more information), just submit a PR with a doc update, referencing the same issue (https://bugs.python.org/issue36144). |


https://bugs.python.org/issue36144