Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assignment expression symbol (walrus) not in built-in help() #81263

Closed
Carreau mannequin opened this issue May 28, 2019 · 7 comments
Closed

Assignment expression symbol (walrus) not in built-in help() #81263

Carreau mannequin opened this issue May 28, 2019 · 7 comments
Labels
3.8 (EOL) end of life 3.9 only security fixes docs Documentation in the Doc dir

Comments

@Carreau
Copy link
Mannequin

Carreau mannequin commented May 28, 2019

BPO 37082
Nosy @gvanrossum, @terryjreedy, @Carreau, @emilyemorehouse, @pablogsal, @tirkarthi

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = None
created_at = <Date 2019-05-28.18:26:23.297>
labels = ['3.8', '3.9', 'docs']
title = 'Assignment expression symbol (walrus) not in built-in help()'
updated_at = <Date 2021-08-22.13:18:41.317>
user = 'https://github.com/Carreau'

bugs.python.org fields:

activity = <Date 2021-08-22.13:18:41.317>
actor = 'mark.dickinson'
assignee = 'docs@python'
closed = False
closed_date = None
closer = None
components = ['Documentation']
creation = <Date 2019-05-28.18:26:23.297>
creator = 'mbussonn'
dependencies = []
files = []
hgrepos = []
issue_num = 37082
keywords = []
message_count = 6.0
messages = ['343813', '343868', '343869', '343871', '344131', '374280']
nosy_count = 7.0
nosy_names = ['gvanrossum', 'terry.reedy', 'docs@python', 'mbussonn', 'emilyemorehouse', 'pablogsal', 'xtreak']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = None
url = 'https://bugs.python.org/issue37082'
versions = ['Python 3.8', 'Python 3.9']

Linked PRs

@Carreau
Copy link
Mannequin Author

Carreau mannequin commented May 28, 2019

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 :-(

@Carreau Carreau mannequin added 3.8 (EOL) end of life 3.9 only security fixes labels May 28, 2019
@Carreau Carreau mannequin assigned docspython May 28, 2019
@Carreau Carreau mannequin added the docs Documentation in the Doc dir label May 28, 2019
@mdickinson
Copy link
Member

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.

@mdickinson
Copy link
Member

@= is also missing. Looks like we need to go through the grammar and reconcile what's there with the symbols help.

@tirkarthi
Copy link
Member

Seems this was added in db7b6b9 (2009) and wasn't updated from then.

@terryjreedy
Copy link
Member

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.

@terryjreedy terryjreedy changed the title Assignment expression operator (walrus) not in built-in help() Assignment expression symbol (walrus) not in built-in help() May 31, 2019
@gvanrossum
Copy link
Member

We might get more help with this issue if the process of updating the help() output were better documented. I recently looked into what it would take to add "FSTRINGS" to the "topics" list, and it's quite complicated -- I only persevered after stepping through pydoc.help() using pdb. I wrote up a few tips in bpo-41045.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
emilyemorehouse added a commit that referenced this issue Sep 27, 2024
* Add assignment expression (:=) to `help`

* Update index for Assignment Expressions to include pair of `assignment; expression`
emilyemorehouse added a commit to emilyemorehouse/cpython that referenced this issue Sep 27, 2024
* Add assignment expression (:=) to `help`

* Update index for Assignment Expressions to include pair of `assignment; expression`
Yhg1s pushed a commit that referenced this issue Sep 27, 2024
…24713)

gh-81263: Add assignment expressions to `help` (#124641)

* Add assignment expression (:=) to `help`

* Update index for Assignment Expressions to include pair of `assignment; expression`
@emilyemorehouse
Copy link
Member

Fixed via #124641 (finally 🎉)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.8 (EOL) end of life 3.9 only security fixes docs Documentation in the Doc dir
Projects
None yet
Development

No branches or pull requests

5 participants