summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/csv.rst4
-rw-r--r--Doc/library/email.message.rst2
-rw-r--r--Doc/library/pickle.rst2
3 files changed, 4 insertions, 4 deletions
diff --git a/Doc/library/csv.rst b/Doc/library/csv.rst
index 6beadc5..9043dbc 100644
--- a/Doc/library/csv.rst
+++ b/Doc/library/csv.rst
@@ -484,7 +484,7 @@ For all other encodings the following :class:`UnicodeReader` and
parameter in their constructor and make sure that the data passes the real
reader or writer encoded as UTF-8::
- import csv, codecs, cStringIO
+ import csv, codecs, io
class UTF8Recoder:
"""
@@ -524,7 +524,7 @@ reader or writer encoded as UTF-8::
def __init__(self, f, dialect=csv.excel, encoding="utf-8", **kwds):
# Redirect output to a queue
- self.queue = cStringIO.StringIO()
+ self.queue = io.StringIO()
self.writer = csv.writer(self.queue, dialect=dialect, **kwds)
self.stream = f
self.encoder = codecs.getincrementalencoder(encoding)()
diff --git a/Doc/library/email.message.rst b/Doc/library/email.message.rst
index 5344b45..f51230c 100644
--- a/Doc/library/email.message.rst
+++ b/Doc/library/email.message.rst
@@ -48,7 +48,7 @@ Here are the methods of the :class:`Message` class:
:class:`Generator` instance and use its :meth:`flatten` method directly.
For example::
- from cStringIO import StringIO
+ from io import StringIO
from email.generator import Generator
fp = StringIO()
g = Generator(fp, mangle_from_=False, maxheaderlen=60)
diff --git a/Doc/library/pickle.rst b/Doc/library/pickle.rst
index 2194523..76248ac 100644
--- a/Doc/library/pickle.rst
+++ b/Doc/library/pickle.rst
@@ -555,7 +555,7 @@ the referenced object.
Here's a silly example that *might* shed more light::
import pickle
- from cStringIO import StringIO
+ from io import StringIO
src = StringIO()
p = pickle.Pickler(src)