summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2013-08-16 22:55:39 (GMT)
committerChristian Heimes <christian@cheimes.de>2013-08-16 22:55:39 (GMT)
commita3811e4b8f70790a3dc8768a455cb8836670de37 (patch)
tree000e0496c1fc58dd59ecede50e2cd756746f3cd9 /Doc/library
parent824f7f366d1b54d2d3100c3130c04cf1dfb4b47c (diff)
parent7bf1125e9fe7fda150af3962c94f857b8461bfd7 (diff)
downloadcpython-a3811e4b8f70790a3dc8768a455cb8836670de37.zip
cpython-a3811e4b8f70790a3dc8768a455cb8836670de37.tar.gz
cpython-a3811e4b8f70790a3dc8768a455cb8836670de37.tar.bz2
merge
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/gzip.rst2
-rw-r--r--Doc/library/mailbox.rst4
-rw-r--r--Doc/library/random.rst6
-rw-r--r--Doc/library/tempfile.rst2
-rw-r--r--Doc/library/unittest.mock.rst4
-rw-r--r--Doc/library/xml.dom.minidom.rst2
6 files changed, 10 insertions, 10 deletions
diff --git a/Doc/library/gzip.rst b/Doc/library/gzip.rst
index 2cbd2d5..8a7c928 100644
--- a/Doc/library/gzip.rst
+++ b/Doc/library/gzip.rst
@@ -62,7 +62,7 @@ The module defines the following items:
value.
The new class instance is based on *fileobj*, which can be a regular file, a
- :class:`StringIO` object, or any other object which simulates a file. It
+ :class:`io.BytesIO` object, or any other object which simulates a file. It
defaults to ``None``, in which case *filename* is opened to provide a file
object.
diff --git a/Doc/library/mailbox.rst b/Doc/library/mailbox.rst
index 0f6aba1..2d8ba71 100644
--- a/Doc/library/mailbox.rst
+++ b/Doc/library/mailbox.rst
@@ -674,8 +674,8 @@ Supported mailbox formats are Maildir, mbox, MH, Babyl, and MMDF.
In Babyl mailboxes, the headers of a message are not stored contiguously
with the body of the message. To generate a file-like representation, the
- headers and body are copied together into a :class:`StringIO` instance
- (from the :mod:`StringIO` module), which has an API identical to that of a
+ headers and body are copied together into a :class:`io.BytesIO` instance,
+ which has an API identical to that of a
file. As a result, the file-like object is truly independent of the
underlying mailbox but does not save memory compared to a string
representation.
diff --git a/Doc/library/random.rst b/Doc/library/random.rst
index 55c9d70..11dd367 100644
--- a/Doc/library/random.rst
+++ b/Doc/library/random.rst
@@ -45,9 +45,9 @@ from sources provided by the operating system.
.. warning::
- The generators of the :mod:`random` module should not be used for security
- purposes. Use :func:`ssl.RAND_bytes` if you require a cryptographically
- secure pseudorandom number generator.
+ The pseudo-random generators of this module should not be used for
+ security purposes. Use :func:`os.urandom` or :class:`SystemRandom` if
+ you require a cryptographically secure pseudo-random number generator.
Bookkeeping functions:
diff --git a/Doc/library/tempfile.rst b/Doc/library/tempfile.rst
index 2ea6323..13b6041 100644
--- a/Doc/library/tempfile.rst
+++ b/Doc/library/tempfile.rst
@@ -82,7 +82,7 @@ The module defines the following user-callable items:
causes the file to roll over to an on-disk file regardless of its size.
The returned object is a file-like object whose :attr:`_file` attribute
- is either a :class:`BytesIO` or :class:`StringIO` object (depending on
+ is either a :class:`io.BytesIO` or :class:`io.StringIO` object (depending on
whether binary or text *mode* was specified) or a true file
object, depending on whether :func:`rollover` has been called. This
file-like object can be used in a :keyword:`with` statement, just like
diff --git a/Doc/library/unittest.mock.rst b/Doc/library/unittest.mock.rst
index 0da6f49..6f3f693 100644
--- a/Doc/library/unittest.mock.rst
+++ b/Doc/library/unittest.mock.rst
@@ -1084,9 +1084,9 @@ you wanted a :class:`NonCallableMock` to be used:
...
TypeError: 'NonCallableMock' object is not callable
-Another use case might be to replace an object with a `StringIO` instance:
+Another use case might be to replace an object with a `io.StringIO` instance:
- >>> from StringIO import StringIO
+ >>> from io import StringIO
>>> def foo():
... print 'Something'
...
diff --git a/Doc/library/xml.dom.minidom.rst b/Doc/library/xml.dom.minidom.rst
index e90c177..5d821f1 100644
--- a/Doc/library/xml.dom.minidom.rst
+++ b/Doc/library/xml.dom.minidom.rst
@@ -55,7 +55,7 @@ instead:
.. function:: parseString(string, parser=None)
Return a :class:`Document` that represents the *string*. This method creates a
- :class:`StringIO` object for the string and passes that on to :func:`parse`.
+ :class:`io.StringIO` object for the string and passes that on to :func:`parse`.
Both functions return a :class:`Document` object representing the content of the
document.