bpo-35044, doc: Use the :exc: role for the exceptions (GH-10037)

(cherry picked from commit e483f02423917dc4dfd25f46e5b9e6fce304777d)

Co-authored-by: Stéphane Wirtel <stephane@wirtel.be>
diff --git a/Doc/library/io.rst b/Doc/library/io.rst
index 98649de..2536c37e 100644
--- a/Doc/library/io.rst
+++ b/Doc/library/io.rst
@@ -39,7 +39,7 @@
 
 All streams are careful about the type of data you give to them.  For example
 giving a :class:`str` object to the ``write()`` method of a binary stream
-will raise a ``TypeError``.  So will giving a :class:`bytes` object to the
+will raise a :exc:`TypeError`.  So will giving a :class:`bytes` object to the
 ``write()`` method of a text stream.
 
 .. versionchanged:: 3.3