Created
July 27, 2020 11:13
-
-
Save terrycojones/d1bbeb0e9c65acf6baeba4a44fede8a8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
cat<<'EOF' | |
(expressions...), [expressions...], | |
{key: value...}, {expressions...} Binding or parenthesized expression, | |
list display, dictionary display, set display | |
x[index], x[index:index], | |
x(arguments...), x.attribute Subscription, slicing, call, attribute reference | |
await x Await expression | |
** Exponentiation | |
+x, -x, ~x Positive, negative, bitwise NOT | |
*, @, /, //, % Multiplication, matrix multiplication, division, | |
floor division, remainder | |
+, - Addition and subtraction | |
<<, >> Shifts | |
& Bitwise AND | |
^ Bitwise XOR | |
| Bitwise OR | |
in, not in, is, is not, | |
<, <=, >, >=, !=, == | |
Comparisons, membership tests, identity tests | |
not x Boolean NOT | |
and Boolean AND | |
or Boolean OR | |
if – else Conditional expression | |
lambda Lambda expression | |
:= Assignment expression | |
From https://docs.python.org/3/reference/expressions.html#operator-precedence | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment