1- \chapter {Expressions }
1+ \chapter {Expressions\label { expressions } }
22\index {expression}
33
44This chapter explains the meaning of the elements of expressions in
@@ -16,7 +16,7 @@ \chapter{Expressions}
1616are the same as for \code {othername}.
1717\index {syntax}
1818
19- \section {Arithmetic conversions }
19+ \section {Arithmetic conversions\label { conversions } }
2020\indexii {arithmetic}{conversion}
2121
2222When a description of an arithmetic operator below uses the phrase
@@ -39,7 +39,9 @@ \section{Arithmetic conversions}
3939Some additional rules apply for certain operators (e.g., a string left
4040argument to the `\% ' operator). Extensions can define their own
4141coercions.
42- \section {Atoms }
42+
43+
44+ \section {Atoms\label {atoms } }
4345\index {atom}
4446
4547Atoms are the most basic elements of expressions. The simplest atoms
@@ -52,7 +54,7 @@ \section{Atoms}
5254enclosure: parenth_form|list_display|dict_display|string_conversion
5355\end {verbatim }
5456
55- \subsection {Identifiers (Names) }
57+ \subsection {Identifiers (Names)\label { atom-identifiers } }
5658\index {name}
5759\index {identifier}
5860
@@ -92,7 +94,7 @@ \subsection{Identifiers (Names)}
9294implementation defined truncation may happen. If the class name
9395consists only of underscores, no transformation is done.
9496
95- \subsection {Literals }
97+ \subsection {Literals\label { atom-literals } }
9698\index {literal}
9799
98100Python supports string literals and various numeric literals:
@@ -115,7 +117,7 @@ \subsection{Literals}
115117\indexiii {immutable}{data}{type}
116118\indexii {immutable}{objects}
117119
118- \subsection {Parenthesized forms }
120+ \subsection {Parenthesized forms\label { parenthesized } }
119121\index {parenthesized form}
120122
121123A parenthesized form is an optional expression list enclosed in
@@ -143,7 +145,7 @@ \subsection{Parenthesized forms}
143145\index {comma}
144146\indexii {tuple}{display}
145147
146- \subsection {List displays }
148+ \subsection {List displays\label { lists } }
147149\indexii {list}{display}
148150
149151A list display is a possibly empty series of expressions enclosed in
@@ -160,7 +162,7 @@ \subsection{List displays}
160162\obindex {list}
161163\indexii {empty}{list}
162164
163- \subsection {Dictionary displays } \label {dict }
165+ \subsection {Dictionary displays\label {dict } }
164166\indexii {dictionary}{display}
165167
166168A dictionary display is a possibly empty series of key/datum pairs
@@ -189,7 +191,7 @@ \subsection{Dictionary displays} \label{dict}
189191stored for a given key value prevails.
190192\indexii {immutable}{objects}
191193
192- \subsection {String conversions }
194+ \subsection {String conversions\label { string-conversions } }
193195\indexii {string}{conversion}
194196\indexii {reverse}{quotes}
195197\indexii {backward}{quotes}
@@ -228,7 +230,7 @@ \subsection{String conversions}
228230\bifuncindex {repr}
229231\bifuncindex {str}
230232
231- \section {Primaries } \label {primaries }
233+ \section {Primaries\label {primaries } }
232234\index {primary}
233235
234236Primaries represent the most tightly bound operations of the language.
@@ -238,7 +240,7 @@ \section{Primaries} \label{primaries}
238240primary: atom | attributeref | subscription | slicing | call
239241\end {verbatim }
240242
241- \subsection {Attribute references }
243+ \subsection {Attribute references\label { attribute-references } }
242244\indexii {attribute}{reference}
243245
244246An attribute reference is a primary followed by a period and a name:
@@ -258,7 +260,7 @@ \subsection{Attribute references}
258260\obindex {module}
259261\obindex {list}
260262
261- \subsection {Subscriptions }
263+ \subsection {Subscriptions\label { subscriptions } }
262264\index {subscription}
263265
264266A subscription selects an item of a sequence (string, tuple or list)
@@ -295,7 +297,7 @@ \subsection{Subscriptions}
295297\index {character}
296298\indexii {string}{item}
297299
298- \subsection {Slicings }
300+ \subsection {Slicings\label { slicings } }
299301\index {slicing}
300302\index {slice}
301303
@@ -358,7 +360,7 @@ \subsection{Slicings}
358360the expressions given as lower bound, upper bound and stride,
359361respectively, substituting \code {None} for missing expressions.
360362
361- \subsection {Calls } \label {calls }
363+ \subsection {Calls\label {calls } }
362364\index {call}
363365
364366A call calls a callable object (e.g., a function) with a possibly empty
@@ -478,7 +480,7 @@ \subsection{Calls} \label{calls}
478480\end {description }
479481
480482
481- \section {The power operator }
483+ \section {The power operator\label { power } }
482484
483485The power operator binds more tightly than unary operators on its
484486left; it binds less tightly than unary operators on its right. The
@@ -502,7 +504,7 @@ \section{The power operator}
502504\exception {TypeError} exception is raised.
503505
504506
505- \section {Unary arithmetic operations }
507+ \section {Unary arithmetic operations\label { unary } }
506508\indexiii {unary}{arithmetic}{operation}
507509\indexiii {unary}{bit-wise}{operation}
508510
@@ -531,7 +533,7 @@ \section{Unary arithmetic operations}
531533a \exception {TypeError} exception is raised.
532534\exindex {TypeError}
533535
534- \section {Binary arithmetic operations }
536+ \section {Binary arithmetic operations\label { binary } }
535537\indexiii {binary}{arithmetic}{operation}
536538
537539The binary arithmetic operations have the conventional priority
@@ -594,7 +596,7 @@ \section{Binary arithmetic operations}
594596type.
595597\index {subtraction}
596598
597- \section {Shifting operations }
599+ \section {Shifting operations\label { shifting } }
598600\indexii {shifting}{operation}
599601
600602The shifting operations have lower priority than the arithmetic
@@ -618,7 +620,7 @@ \section{Shifting operations}
618620exception.
619621\exindex {ValueError}
620622
621- \section {Binary bit-wise operations }
623+ \section {Binary bit-wise operations\label { bitwise } }
622624\indexiii {binary}{bit-wise}{operation}
623625
624626Each of the three bitwise operations has a different priority level:
@@ -646,7 +648,7 @@ \section{Binary bit-wise operations}
646648\indexii {bit-wise}{or}
647649\indexii {inclusive}{or}
648650
649- \section {Comparisons }
651+ \section {Comparisons\label { comparisons } }
650652\index {comparison}
651653
652654Contrary to \C , all comparison operations in Python have the same
@@ -749,7 +751,7 @@ \section{Comparisons}
749751\opindex {is not}
750752\indexii {identity}{test}
751753
752- \section {Boolean operations } \label {Booleans }
754+ \section {Boolean operations\label {Booleans } }
753755\indexii {Boolean}{operation}
754756
755757Boolean operations have the lowest priority of all Python operations:
@@ -821,7 +823,7 @@ \section{Boolean operations} \label{Booleans}
821823 return lambda x, n=increment: x+n
822824\end {verbatim }
823825
824- \section {Expression lists and expression lists }
826+ \section {Expression lists\label { exprlists } }
825827\indexii {expression}{list}
826828
827829\begin {verbatim }
@@ -841,7 +843,7 @@ \section{Expression lists and expression lists}
841843\code {()}.)
842844\indexii {trailing}{comma}
843845
844- \section {Summary }
846+ \section {Summary\label { summary } }
845847
846848The following table summarizes the operator precedences in Python,
847849from lowest precedence (least binding) to highest precedence (most
0 commit comments