summaryrefslogtreecommitdiffstats
path: root/Doc/ref/ref5.tex
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2002-04-30 02:18:51 (GMT)
committerFred Drake <fdrake@acm.org>2002-04-30 02:18:51 (GMT)
commitaf93c4c8d99445b518af91a3b7cbfe334a34b013 (patch)
treec0d81c80f53a3620243e2316466859b25fce67d6 /Doc/ref/ref5.tex
parent67d687a1145d12f1e7e835a0c8259ba1cc2450b1 (diff)
downloadcpython-af93c4c8d99445b518af91a3b7cbfe334a34b013.zip
cpython-af93c4c8d99445b518af91a3b7cbfe334a34b013.tar.gz
cpython-af93c4c8d99445b518af91a3b7cbfe334a34b013.tar.bz2
Added a missing "|" in the grammar productions used in the reference manual
(reported by François Pinard). Added some missing "_" characters in the same cluster of productions. Added missing floor division operator in m_expr production, and mention floor division in the relevant portion of the text.
Diffstat (limited to 'Doc/ref/ref5.tex')
-rw-r--r--Doc/ref/ref5.tex16
1 files changed, 9 insertions, 7 deletions
diff --git a/Doc/ref/ref5.tex b/Doc/ref/ref5.tex
index e437263..6e28fab 100644
--- a/Doc/ref/ref5.tex
+++ b/Doc/ref/ref5.tex
@@ -648,11 +648,12 @@ operators:
\begin{productionlist}
\production{m_expr}
{\token{u_expr} | \token{m_expr} "*" \token{u_expr}
+ | \token{m_expr} "//" \token{u_expr}
| \token{m_expr} "/" \token{u_expr}}
\productioncont{| \token{m_expr} "\%" \token{u_expr}}
\production{a_expr}
- {\token{m_expr} | \token{aexpr} "+" \token{m_expr}
- \token{aexpr} "-" \token{m_expr}}
+ {\token{m_expr} | \token{a_expr} "+" \token{m_expr}
+ | \token{a_expr} "-" \token{m_expr}}
\end{productionlist}
The \code{*} (multiplication) operator yields the product of its
@@ -663,11 +664,12 @@ then multiplied together. In the latter case, sequence repetition is
performed; a negative repetition factor yields an empty sequence.
\index{multiplication}
-The \code{/} (division) operator yields the quotient of its
-arguments. The numeric arguments are first converted to a common
-type. Plain or long integer division yields an integer of the same
-type; the result is that of mathematical division with the `floor'
-function applied to the result. Division by zero raises the
+The \code{/} (division) and \code{//} (floor division) operators yield
+the quotient of their arguments. The numeric arguments are first
+converted to a common type. Plain or long integer division yields an
+integer of the same type; the result is that of mathematical division
+with the `floor' function applied to the result. Division by zero
+raises the
\exception{ZeroDivisionError} exception.
\exindex{ZeroDivisionError}
\index{division}