Skip to content

Commit 60f81ae

Browse files
committed
linted
1 parent b176a5c commit 60f81ae

290 files changed

Lines changed: 18652 additions & 25549 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 66 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1,127 +1,109 @@
1+
<?xml version="1.0"?>
12
<section xml:id="appendices_operator-precedence-table">
2-
<title>Operator precedence table</title>
3-
4-
5-
<p xml:id="appendices_index-0">The following table summarizes the operator precedence of Python operators <em>in this book</em>, from
3+
<title>Operator precedence table</title>
4+
<p xml:id="appendices_index-0">The following table summarizes the operator precedence of Python operators <em>in this book</em>, from
65
highest precedence (most binding) to lowest
76
precedence (least binding). Operators in
87
the same box have the same precedence. Unless syntax is explicitly given,
98
operators are binary. Operators in the same box group left to right (except for
109
exponentiation, which groups from right to left).
1110
This is many of the entries from the complete Python table at
1211
<url href="https://docs.python.org/3/reference/expressions.html#operator-precedence" visual="https://docs.python.org/3/reference/expressions.html#operator-precedence">https://docs.python.org/3/reference/expressions.html#operator-precedence</url>.</p>
13-
<p>In the row for comparisons, membership tests, and identity tests, all have the same
12+
<p>In the row for comparisons, membership tests, and identity tests, all have the same
1413
precedence and have a left-to-right chaining feature; for example <c>3 &lt; x &lt;= y != z</c>.</p>
15-
<table><tabular>
16-
17-
18-
19-
20-
<row header="yes">
21-
<cell>
14+
<table>
15+
<tabular>
16+
<row header="yes">
17+
<cell>
2218
Operator
2319
</cell>
24-
<cell>
20+
<cell>
2521
Description
2622
</cell>
27-
</row>
28-
29-
30-
<row>
31-
<cell>
32-
<c>(expressions...)</c>,
23+
</row>
24+
<row>
25+
<cell><c>(expressions...)</c>,
3326
<c>[expressions...]</c>,
3427
<c>{key: value...}</c>,
35-
<c>{expressions...}</c>
36-
</cell>
37-
<cell>
28+
<c>{expressions...}</c></cell>
29+
<cell>
3830
Binding or tuple display,
3931
list display,
4032
dictionary display,
4133
set display
4234
</cell>
43-
</row>
44-
<row>
45-
<cell>
46-
<c>x[index]</c>, <c>x[index:index]</c>,
47-
<c>x(arguments...)</c>, <c>x.attribute</c>
48-
</cell>
49-
<cell>
35+
</row>
36+
<row>
37+
<cell><c>x[index]</c>, <c>x[index:index]</c>,
38+
<c>x(arguments...)</c>, <c>x.attribute</c></cell>
39+
<cell>
5040
Subscription, slicing,
5141
call, attribute reference
5242
</cell>
53-
</row>
54-
<row>
55-
<cell>
56-
<c>**</c>
57-
</cell>
58-
<cell>
43+
</row>
44+
<row>
45+
<cell>
46+
<c>**</c>
47+
</cell>
48+
<cell>
5949
Exponentiation
6050
(groups right to left)
6151
</cell>
62-
</row>
63-
<row>
64-
<cell>
65-
<c>-x</c>
66-
</cell>
67-
<cell>
52+
</row>
53+
<row>
54+
<cell>
55+
<c>-x</c>
56+
</cell>
57+
<cell>
6858
Negation
6959
</cell>
70-
</row>
71-
<row>
72-
<cell>
73-
<c>*</c>, <c>/</c>, <c>//</c>, <c>%</c>
74-
</cell>
75-
<cell>
60+
</row>
61+
<row>
62+
<cell><c>*</c>, <c>/</c>, <c>//</c>, <c>%</c></cell>
63+
<cell>
7664
Multiplication,
7765
real and integer division,
7866
remainder
7967
</cell>
80-
</row>
81-
<row>
82-
<cell>
83-
<c>+</c>, <c>-</c>
84-
</cell>
85-
<cell>
68+
</row>
69+
<row>
70+
<cell><c>+</c>, <c>-</c></cell>
71+
<cell>
8672
Addition and subtraction
8773
</cell>
88-
</row>
89-
<row>
90-
<cell>
91-
<c>in</c>, <c>not in</c>, <c>is</c>, <c>is not</c>,
92-
<c>&lt;</c>, <c>&lt;=</c>, <c>&gt;</c>, <c>&gt;=</c>, <c>!=</c>, <c>==</c>
93-
</cell>
94-
<cell>
74+
</row>
75+
<row>
76+
<cell><c>in</c>, <c>not in</c>, <c>is</c>, <c>is not</c>,
77+
<c>&lt;</c>, <c>&lt;=</c>, <c>&gt;</c>, <c>&gt;=</c>, <c>!=</c>, <c>==</c></cell>
78+
<cell>
9579
Comparisons, including membership
9680
tests and identity tests
9781
</cell>
98-
</row>
99-
<row>
100-
<cell>
101-
<c>not x</c>
102-
</cell>
103-
<cell>
82+
</row>
83+
<row>
84+
<cell>
85+
<c>not x</c>
86+
</cell>
87+
<cell>
10488
Boolean NOT
10589
</cell>
106-
</row>
107-
<row>
108-
<cell>
109-
<c>and</c>
110-
</cell>
111-
<cell>
90+
</row>
91+
<row>
92+
<cell>
93+
<c>and</c>
94+
</cell>
95+
<cell>
11296
Boolean AND
11397
</cell>
114-
</row>
115-
<row>
116-
<cell>
117-
<c>or</c>
118-
</cell>
119-
<cell>
98+
</row>
99+
<row>
100+
<cell>
101+
<c>or</c>
102+
</cell>
103+
<cell>
120104
Boolean OR
121105
</cell>
122-
</row>
123-
124-
125-
</tabular></table>
126-
</section>
127-
106+
</row>
107+
</tabular>
108+
</table>
109+
</section>

0 commit comments

Comments
 (0)