aboutsummaryrefslogtreecommitdiff
path: root/Python Operators.wiki
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2023-07-11 22:04:03 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2023-07-11 22:04:03 +0200
commit3026358ffd836632d2725115f8f9017952e0d1b5 (patch)
tree594d9e098810e9ab0a92741c2a17d4354556696c /Python Operators.wiki
parentsön 25 jun 2023 06:41:04 CEST (diff)
downloadwiki-public-3026358ffd836632d2725115f8f9017952e0d1b5.tar.gz
wiki-public-3026358ffd836632d2725115f8f9017952e0d1b5.tar.xz
tis 11 jul 2023 22:04:02 CEST
Diffstat (limited to 'Python Operators.wiki')
-rw-r--r--Python Operators.wiki21
1 files changed, 21 insertions, 0 deletions
diff --git a/Python Operators.wiki b/Python Operators.wiki
index aa9dbc1..fae6364 100644
--- a/Python Operators.wiki
+++ b/Python Operators.wiki
@@ -1,3 +1,4 @@
+== Operators ==
{{{
< __lt__
<= __le__
@@ -37,3 +38,23 @@ __bool__
__str__
__repr__
}}}
+
+== Order of operations ==
+1. parenthesis
+2. subscription_ call, attribute reference `x.attr`
+3. `await`
+4. `**`
+5. Unary prefixes `+`, `-`, `~`
+6. `*`, `@`, `/`, `//`, `%`
+7. `+`, `+`
+8. `<<`, `>>`
+9. `&`
+10. `^`
+11. `|`
+12. `in`, `not in` `is`, `is not`, and all comparison operators
+13. `not` prefix
+14. `and`
+15. `or`
+16. if-else expression
+17. lambda
+18. `:=`