classification
Title: Assignment expression symbol (walrus) not in built-in help()
Type: Stage:
Components: Documentation Versions: Python 3.9, Python 3.8
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, emilyemorehouse, mark.dickinson, mbussonn, pablogsal, terry.reedy, xtreak
Priority: normal Keywords:

Created on 2019-05-28 18:26 by mbussonn, last changed 2019-05-31 21:55 by terry.reedy.

Messages (5)
msg343813 - (view) Author: Matthias Bussonnier (mbussonn) * Date: 2019-05-28 18:26
Do the following at a Python prompt: 
```
>>> help()

Welcome to Python 3.8's help utility!

[...]SNIP

help> symbols

Here is a list of the punctuation symbols which Python assigns special meaning
to. Enter any symbol to get more help.

!=                  +                   <=                  __
"                   +=                  <>                  `
"""                 ,                   ==                  b"
%                   -                   >                   b'
%=                  -=                  >=                  f"
&                   .                   >>                  f'
&=                  ...                 >>=                 j
'                   /                   @                   r"
'''                 //                  J                   r'
(                   //=                 [                   u"
)                   /=                  \                   u'
*                   :                   ]                   |
**                  <                   ^                   |=
**=                 <<                  ^=                  ~
*=                  <<=                 _
```

Oh no ! Our favorite `:=` is missing :-(
msg343868 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2019-05-29 07:22
Looks like that list could do with some attention:

- I don't see regular assignment there, either.
- And "`" shouldn't be in that list.
- Neither should "<>"
- "->" (for function annotations) is missing.
msg343869 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2019-05-29 07:23
@= is also missing. Looks like we need to go through the grammar and reconcile what's there with the symbols help.
msg343871 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python triager) Date: 2019-05-29 07:57
Seems this was added in db7b6b95828c25df6f428bc21a5d6d1cb68287a0 (2009) and wasn't updated from then.
msg344131 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2019-05-31 21:55
The augmented assignment symbol, like that for plain assignment, is not, properly speaking, an operator.  But it definitely is a symbol that needs to be documented.

1. Generally update the help symbol list.

2. Document :=, assignment expression, in the regular docs, but I found nothing.

':=' should be on https://docs.python.org/3.8/genindex-Symbols.html just ':(colon)'.

'expression' should be listed under 'assignment on
https://docs.python.org/3.8/genindex-A.html

I think 'assignment' should be listed under 'expression' on
https://docs.python.org/3.8/genindex-E.html

I could not find anything in the expressions chapter.
History
Date User Action Args
2019-05-31 21:55:03terry.reedysetnosy: + terry.reedy

messages: + msg344131
title: Assignment expression operator (walrus) not in built-in help() -> Assignment expression symbol (walrus) not in built-in help()
2019-05-29 07:57:48xtreaksetnosy: + xtreak
messages: + msg343871
2019-05-29 07:23:42mark.dickinsonsetmessages: + msg343869
2019-05-29 07:22:40mark.dickinsonsetnosy: + mark.dickinson
messages: + msg343868
2019-05-28 23:50:46pablogsalsetnosy: + pablogsal
2019-05-28 18:46:27xtreaksetnosy: + emilyemorehouse
2019-05-28 18:26:23mbussonncreate