summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-12-02 21:15:22 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2016-12-02 21:15:22 (GMT)
commitb6a6b45458490c6928e4f915d7bc83b4a7b44799 (patch)
tree2cf1808557dc3bb99e8ff2f7068e3429767e7b8e /Doc/library
parent3c35fdb8fbf72c750ab19036b6145751ccbec856 (diff)
parentee1b01a41b0c1f212588f840a0b79b1b8876cceb (diff)
downloadcpython-b6a6b45458490c6928e4f915d7bc83b4a7b44799.zip
cpython-b6a6b45458490c6928e4f915d7bc83b4a7b44799.tar.gz
cpython-b6a6b45458490c6928e4f915d7bc83b4a7b44799.tar.bz2
Issue #21818: Fixed references to classes that have names matching with module
names.
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/array.rst2
-rw-r--r--Doc/library/datetime.rst6
-rw-r--r--Doc/library/mmap.rst8
-rw-r--r--Doc/library/netrc.rst10
-rw-r--r--Doc/library/socket.rst2
5 files changed, 14 insertions, 14 deletions
diff --git a/Doc/library/array.rst b/Doc/library/array.rst
index 24f3f62..4ac7bb5 100644
--- a/Doc/library/array.rst
+++ b/Doc/library/array.rst
@@ -254,7 +254,7 @@ When an array object is printed or converted to a string, it is represented as
empty, otherwise it is a string if the *typecode* is ``'u'``, otherwise it is a
list of numbers. The string is guaranteed to be able to be converted back to an
array with the same type and value using :func:`eval`, so long as the
-:func:`array` function has been imported using ``from array import array``.
+:class:`~array.array` class has been imported using ``from array import array``.
Examples::
array('l')
diff --git a/Doc/library/datetime.rst b/Doc/library/datetime.rst
index ecaad06..9dab353 100644
--- a/Doc/library/datetime.rst
+++ b/Doc/library/datetime.rst
@@ -1368,8 +1368,8 @@ Using datetime with tzinfo:
.. _datetime-time:
-:class:`time` Objects
----------------------
+:class:`.time` Objects
+----------------------
A time object represents a (local) time of day, independent of any particular
day, and subject to adjustment via a :class:`tzinfo` object.
@@ -1466,7 +1466,7 @@ Supported operations:
``!=``. The latter cases return :const:`False` or :const:`True`, respectively.
.. versionchanged:: 3.3
- Equality comparisons between naive and aware :class:`time` instances
+ Equality comparisons between naive and aware :class:`~datetime.time` instances
don't raise :exc:`TypeError`.
* hash, use as dict key
diff --git a/Doc/library/mmap.rst b/Doc/library/mmap.rst
index 6e6e290..f46bf66 100644
--- a/Doc/library/mmap.rst
+++ b/Doc/library/mmap.rst
@@ -14,7 +14,7 @@ byte by doing ``obj[index] = 97``, or change a subsequence by assigning to a
slice: ``obj[i1:i2] = b'...'``. You can also read and write data starting at
the current file position, and :meth:`seek` through the file to different positions.
-A memory-mapped file is created by the :class:`mmap` constructor, which is
+A memory-mapped file is created by the :class:`~mmap.mmap` constructor, which is
different on Unix and on Windows. In either case you must provide a file
descriptor for a file opened for update. If you wish to map an existing Python
file object, use its :meth:`fileno` method to obtain the correct value for the
@@ -70,7 +70,7 @@ To map anonymous memory, -1 should be passed as the fileno along with the length
**(Unix version)** Maps *length* bytes from the file specified by the file
descriptor *fileno*, and returns a mmap object. If *length* is ``0``, the
maximum length of the map will be the current size of the file when
- :class:`mmap` is called.
+ :class:`~mmap.mmap` is called.
*flags* specifies the nature of the mapping. :const:`MAP_PRIVATE` creates a
private copy-on-write mapping, so changes to the contents of the mmap
@@ -97,7 +97,7 @@ To map anonymous memory, -1 should be passed as the fileno along with the length
by the descriptor *fileno* is internally automatically synchronized
with physical backing store on Mac OS X and OpenVMS.
- This example shows a simple way of using :class:`mmap`::
+ This example shows a simple way of using :class:`~mmap.mmap`::
import mmap
@@ -122,7 +122,7 @@ To map anonymous memory, -1 should be passed as the fileno along with the length
mm.close()
- :class:`mmap` can also be used as a context manager in a :keyword:`with`
+ :class:`~mmap.mmap` can also be used as a context manager in a :keyword:`with`
statement.::
import mmap
diff --git a/Doc/library/netrc.rst b/Doc/library/netrc.rst
index cdc2616..64aa3ac 100644
--- a/Doc/library/netrc.rst
+++ b/Doc/library/netrc.rst
@@ -12,13 +12,13 @@
--------------
-The :class:`netrc` class parses and encapsulates the netrc file format used by
+The :class:`~netrc.netrc` class parses and encapsulates the netrc file format used by
the Unix :program:`ftp` program and other FTP clients.
.. class:: netrc([file])
- A :class:`netrc` instance or subclass instance encapsulates data from a netrc
+ A :class:`~netrc.netrc` instance or subclass instance encapsulates data from a netrc
file. The initialization argument, if present, specifies the file to parse. If
no argument is given, the file :file:`.netrc` in the user's home directory will
be read. Parse errors will raise :exc:`NetrcParseError` with diagnostic
@@ -35,7 +35,7 @@ the Unix :program:`ftp` program and other FTP clients.
.. exception:: NetrcParseError
- Exception raised by the :class:`netrc` class when syntactical errors are
+ Exception raised by the :class:`~netrc.netrc` class when syntactical errors are
encountered in source text. Instances of this exception provide three
interesting attributes: :attr:`msg` is a textual explanation of the error,
:attr:`filename` is the name of the source file, and :attr:`lineno` gives the
@@ -47,7 +47,7 @@ the Unix :program:`ftp` program and other FTP clients.
netrc Objects
-------------
-A :class:`netrc` instance has the following methods:
+A :class:`~netrc.netrc` instance has the following methods:
.. method:: netrc.authenticators(host)
@@ -63,7 +63,7 @@ A :class:`netrc` instance has the following methods:
Dump the class data as a string in the format of a netrc file. (This discards
comments and may reorder the entries.)
-Instances of :class:`netrc` have public instance variables:
+Instances of :class:`~netrc.netrc` have public instance variables:
.. attribute:: netrc.hosts
diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst
index 9671857..9c10867 100644
--- a/Doc/library/socket.rst
+++ b/Doc/library/socket.rst
@@ -1429,7 +1429,7 @@ Note that there are no methods :meth:`read` or :meth:`write`; use
:meth:`~socket.recv` and :meth:`~socket.send` without *flags* argument instead.
Socket objects also have these (read-only) attributes that correspond to the
-values given to the :class:`socket` constructor.
+values given to the :class:`~socket.socket` constructor.
.. attribute:: socket.family