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

Skip to content

Commit 8b605eb

Browse files
committed
documented writelines()
1 parent a84ec51 commit 8b605eb

2 files changed

Lines changed: 24 additions & 6 deletions

File tree

Doc/lib/libtypes.tex

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -294,9 +294,12 @@ \subsubsection{More String Operations.}
294294
as a C sprintf format string to be applied to the right argument, and
295295
returns the string resulting from this formatting operation.
296296

297-
Unless the format string requires exactly one argument, the right
298-
argument should be a tuple of the correct size. The following format
299-
characters are understood: \%, c, s, i, d, u, o, x, X, e, E, f, g, G.
297+
The right argument should be a tuple with one item for each argument
298+
required by the format string; if the string requires a single
299+
argument, the right argument may also be a single non-tuple object.%
300+
\footnote{A tuple object in this case should be a singleton.}
301+
The following format characters are understood:
302+
\%, c, s, i, d, u, o, x, X, e, E, f, g, G.
300303
Width and precision may be a * to specify that an integer argument
301304
specifies the actual width or precision. The flag characters -, +,
302305
blank, \# and 0 are understood. The size specifiers h, l or L may be
@@ -605,6 +608,12 @@ \subsubsection{File Objects.}
605608
Write a string to the file. There is no return value.
606609
\end{funcdesc}
607610

611+
\begin{funcdesc}{writelines}{list}
612+
Write a list of strings to the file. There is no return value.
613+
(The name is intended to match \code{readlines}; \code{writelines}
614+
does not add line separators.)
615+
\end{funcdesc}
616+
608617
\subsubsection{Internal Objects.}
609618

610619
(See the Python Reference Manual for these.)

Doc/libtypes.tex

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -294,9 +294,12 @@ \subsubsection{More String Operations.}
294294
as a C sprintf format string to be applied to the right argument, and
295295
returns the string resulting from this formatting operation.
296296

297-
Unless the format string requires exactly one argument, the right
298-
argument should be a tuple of the correct size. The following format
299-
characters are understood: \%, c, s, i, d, u, o, x, X, e, E, f, g, G.
297+
The right argument should be a tuple with one item for each argument
298+
required by the format string; if the string requires a single
299+
argument, the right argument may also be a single non-tuple object.%
300+
\footnote{A tuple object in this case should be a singleton.}
301+
The following format characters are understood:
302+
\%, c, s, i, d, u, o, x, X, e, E, f, g, G.
300303
Width and precision may be a * to specify that an integer argument
301304
specifies the actual width or precision. The flag characters -, +,
302305
blank, \# and 0 are understood. The size specifiers h, l or L may be
@@ -605,6 +608,12 @@ \subsubsection{File Objects.}
605608
Write a string to the file. There is no return value.
606609
\end{funcdesc}
607610

611+
\begin{funcdesc}{writelines}{list}
612+
Write a list of strings to the file. There is no return value.
613+
(The name is intended to match \code{readlines}; \code{writelines}
614+
does not add line separators.)
615+
\end{funcdesc}
616+
608617
\subsubsection{Internal Objects.}
609618

610619
(See the Python Reference Manual for these.)

0 commit comments

Comments
 (0)