Issue #21818: Fixed references to classes that have names matching with module
names.
diff --git a/Doc/library/netrc.rst b/Doc/library/netrc.rst
index 713c8df..1dcfd2f 100644
--- a/Doc/library/netrc.rst
+++ b/Doc/library/netrc.rst
@@ -14,13 +14,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
@@ -37,7 +37,7 @@
 
 .. 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
@@ -49,7 +49,7 @@
 netrc Objects
 -------------
 
-A :class:`netrc` instance has the following methods:
+A :class:`~netrc.netrc` instance has the following methods:
 
 
 .. method:: netrc.authenticators(host)
@@ -65,7 +65,7 @@
    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