mirror of https://github.com/python/cpython
Note that getvalue() must be called before close().
This commit is contained in:
parent
0fcbe8dde2
commit
5320998da5
|
@ -1,4 +1,5 @@
|
||||||
\section{Standard Module \sectcode{StringIO}}
|
\section{Standard Module \sectcode{StringIO}}
|
||||||
|
\label{module-StringIO}
|
||||||
|
|
||||||
\stmodindex{StringIO}
|
\stmodindex{StringIO}
|
||||||
|
|
||||||
|
@ -10,5 +11,7 @@ When a \code{StringIO} object is created, it can be initialized
|
||||||
to an existing string by passing the string to the constructor.
|
to an existing string by passing the string to the constructor.
|
||||||
If no string is given, the \code{StringIO} will start empty.
|
If no string is given, the \code{StringIO} will start empty.
|
||||||
|
|
||||||
The method \code{getvalue()} can be called to retrieve the
|
The method \code{getvalue()} can be called to retrieve the entire
|
||||||
entire contents of the ``file'' at any time.
|
contents of the ``file'' at any time before the \code{StringIO}
|
||||||
|
object's \code{close()} method is called. Calling \code{close()} will
|
||||||
|
free the memory buffer.
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
\section{Standard Module \sectcode{StringIO}}
|
\section{Standard Module \sectcode{StringIO}}
|
||||||
|
\label{module-StringIO}
|
||||||
|
|
||||||
\stmodindex{StringIO}
|
\stmodindex{StringIO}
|
||||||
|
|
||||||
|
@ -10,5 +11,7 @@ When a \code{StringIO} object is created, it can be initialized
|
||||||
to an existing string by passing the string to the constructor.
|
to an existing string by passing the string to the constructor.
|
||||||
If no string is given, the \code{StringIO} will start empty.
|
If no string is given, the \code{StringIO} will start empty.
|
||||||
|
|
||||||
The method \code{getvalue()} can be called to retrieve the
|
The method \code{getvalue()} can be called to retrieve the entire
|
||||||
entire contents of the ``file'' at any time.
|
contents of the ``file'' at any time before the \code{StringIO}
|
||||||
|
object's \code{close()} method is called. Calling \code{close()} will
|
||||||
|
free the memory buffer.
|
||||||
|
|
Loading…
Reference in New Issue