Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c2f496a

Browse files
committed
Add a note to the description of the interaction between the softspace
attribute of file objects, the print statement, and other file operations. This closes SF bug #484857. Fix minor markup nits.
1 parent 39368c1 commit c2f496a

1 file changed

Lines changed: 12 additions & 9 deletions

File tree

Doc/ref/ref6.tex

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ \section{Expression statements \label{exprstmts}}
4545
In interactive mode, if the value is not \code{None}, it is converted
4646
to a string using the built-in \function{repr()}\bifuncindex{repr}
4747
function and the resulting string is written to standard output (see
48-
section \ref{print}) on a line by itself. (Expression statements
49-
yielding None are not written, so that procedure calls do not cause
50-
any output.)
48+
section~\ref{print}) on a line by itself. (Expression statements
49+
yielding \code{None} are not written, so that procedure calls do not
50+
cause any output.)
5151
\ttindex{None}
5252
\indexii{string}{conversion}
5353
\index{output}
@@ -119,7 +119,7 @@ \section{Assignment statements \label{assignment}}
119119
| \token{slicing}}
120120
\end{productionlist}
121121

122-
(See section \ref{primaries} for the syntax definitions for the last
122+
(See section~\ref{primaries} for the syntax definitions for the last
123123
three symbols.)
124124

125125
An assignment statement evaluates the expression list (remember that
@@ -134,7 +134,7 @@ \section{Assignment statements \label{assignment}}
134134
ultimately perform the assignment and decide about its validity, and
135135
may raise an exception if the assignment is unacceptable. The rules
136136
observed by various types and the exceptions raised are given with the
137-
definition of the object types (see section \ref{types}).
137+
definition of the object types (see section~\ref{types}).
138138
\index{target}
139139
\indexii{target}{list}
140140

@@ -285,7 +285,7 @@ \subsection{Augmented Assignment statements \label{augassign}}
285285
| \token{slicing}}
286286
\end{productionlist}
287287

288-
(See section \ref{primaries} for the syntax definitions for the last
288+
(See section~\ref{primaries} for the syntax definitions for the last
289289
three symbols.)
290290

291291
An augmented assignment evaluates the target (which, unlike normal
@@ -304,7 +304,7 @@ \subsection{Augmented Assignment statements \label{augassign}}
304304
With the exception of assigning to tuples and multiple targets in a single
305305
statement, the assignment done by augmented assignment statements is handled
306306
the same way as normal assignments. Similarly, with the exception of the
307-
possible \emph{in-place} behaviour, the binary operation performed by
307+
possible \emph{in-place} behavior, the binary operation performed by
308308
augmented assignment is the same as the normal binary operations.
309309

310310

@@ -379,7 +379,10 @@ \section{The \keyword{print} statement \label{print}}
379379
output is \character{\e n}, or (3) when the last write operation on
380380
standard output was not a \keyword{print} statement. (In some cases
381381
it may be functional to write an empty string to standard output for
382-
this reason.)
382+
this reason.) \note{Objects which act like file objects but which are
383+
not the built-in file objects often do not properly emulate this
384+
aspect of the file object's behavior, so it is best not to rely on
385+
this.}
383386
\index{output}
384387
\indexii{writing}{values}
385388
@@ -470,7 +473,7 @@ \section{The \keyword{raise} statement \label{raise}}
470473
its parameter.
471474
472475
If a third object is present, and it is not \code{None}, it should be
473-
a traceback object (see section \ref{traceback}), and it is
476+
a traceback object (see section~\ref{traceback}), and it is
474477
substituted instead of the current location as the place where the
475478
exception occurred. This is useful to re-raise an exception
476479
transparently in an except clause.

0 commit comments

Comments
 (0)