[New-bugs-announce] [issue43837] Operator precedence documentation could be more clear

Aidan Feldman report at bugs.python.org
Wed Apr 14 00:38:05 EDT 2021


New submission from Aidan Feldman <aidan.feldman at gmail.com>:

I am teaching a class on Python for people who are new to coding, and I was talking them through the operator precedence table:

https://docs.python.org/3/reference/expressions.html#operator-precedence

A couple things that confused the students:

- "Highest precedence" is on the bottom, while "lowest precedence" is on top
- There isn't any mention of variables. While not operators, probably worth mentioning that they (effectively?) have higher precedence than any of the operators.

I'd be happy to try making my first contribution to Python if there's interest in those edits. Also, I have an example breaking down operator precedence in practice here, which I could include:

https://colab.research.google.com/github/afeld/python-public-policy/blob/main/lecture_2.ipynb#scrollTo=UTxeT5RvqSFl

Thanks!

----------
assignee: docs at python
components: Documentation
messages: 391030
nosy: aidan.feldman, docs at python
priority: normal
severity: normal
status: open
title: Operator precedence documentation could be more clear
type: enhancement
versions: Python 3.10, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43837>
_______________________________________


More information about the New-bugs-announce mailing list