aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md28
1 files changed, 27 insertions, 1 deletions
diff --git a/README.md b/README.md
index 03e2ff4..bd19263 100644
--- a/README.md
+++ b/README.md
@@ -16,4 +16,30 @@
two overloads -- one for the supertype, one for the subtype.
This needs doing regardless of changes to boxing/unboxing primitives since
- we currently use raw strings rather than boxing them into Java strings. \ No newline at end of file
+ we currently use raw strings rather than boxing them into Java strings.
+
+## Python precedence
+
+The table below gives precedence from lowest to highest in Python 3.5.
+Some rows have the same precedence for serialisation to improve code
+clarity.
+
+Operator | Precedence (serialisation)
+---------|-----------
+`lambda` | 0
+`if – else` | 10
+`or` | 20
+`and` | 20
+`not x` | 40
+`in`, `not in`, `is`, `is not`, `<`, `<=`, `>`, `>=`, `!=`, `==` | 50
+`|` | 60
+`^` | 70
+`&` | 80
+`<<`, `>>` | 90
+`+`, `-` | 100
+`*`, `@`, `/`, `//`, `%` | 110
+`+x`, `-x`, `~x` | 120
+`**` | 130
+`await x` | 140
+`x[index]`, `x[index:index]`, `x(arguments...)`, `x.attribute` | 150
+`(expressions...)`, `[expressions...]`, `{key: value...}`, `{expressions...}`` | 160 \ No newline at end of file