summaryrefslogtreecommitdiffstats
path: root/Doc/faq/library.rst
diff options
context:
space:
mode:
authorAdam Turner <9087854+AA-Turner@users.noreply.github.com>2023-08-20 19:01:13 (GMT)
committerGitHub <noreply@github.com>2023-08-20 19:01:13 (GMT)
commit6323bc33ff9f445a947adf4af42b8be7e44c730c (patch)
treeb4d220376b35b3d69a3e9f78264a094ac7c344ff /Doc/faq/library.rst
parent92815cc7cf3df8ab702c7cea4efaef349a4b0480 (diff)
downloadcpython-6323bc33ff9f445a947adf4af42b8be7e44c730c.zip
cpython-6323bc33ff9f445a947adf4af42b8be7e44c730c.tar.gz
cpython-6323bc33ff9f445a947adf4af42b8be7e44c730c.tar.bz2
Resolve reference warnings in faq/library.rst (#108149)
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com> Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Diffstat (limited to 'Doc/faq/library.rst')
-rw-r--r--Doc/faq/library.rst13
1 files changed, 8 insertions, 5 deletions
diff --git a/Doc/faq/library.rst b/Doc/faq/library.rst
index 9e37274..476a43d 100644
--- a/Doc/faq/library.rst
+++ b/Doc/faq/library.rst
@@ -111,7 +111,7 @@ Is there an equivalent to C's onexit() in Python?
-------------------------------------------------
The :mod:`atexit` module provides a register function that is similar to C's
-:c:func:`onexit`.
+:c:func:`!onexit`.
Why don't my signal handlers work?
@@ -397,7 +397,7 @@ These aren't::
D[x] = D[x] + 1
Operations that replace other objects may invoke those other objects'
-:meth:`__del__` method when their reference count reaches zero, and that can
+:meth:`~object.__del__` method when their reference count reaches zero, and that can
affect things. This is especially true for the mass updates to dictionaries and
lists. When in doubt, use a mutex!
@@ -730,14 +730,17 @@ The :mod:`select` module is commonly used to help with asynchronous I/O on
sockets.
To prevent the TCP connect from blocking, you can set the socket to non-blocking
-mode. Then when you do the :meth:`socket.connect`, you will either connect immediately
+mode. Then when you do the :meth:`~socket.socket.connect`,
+you will either connect immediately
(unlikely) or get an exception that contains the error number as ``.errno``.
``errno.EINPROGRESS`` indicates that the connection is in progress, but hasn't
finished yet. Different OSes will return different values, so you're going to
have to check what's returned on your system.
-You can use the :meth:`socket.connect_ex` method to avoid creating an exception. It will
-just return the errno value. To poll, you can call :meth:`socket.connect_ex` again later
+You can use the :meth:`~socket.socket.connect_ex` method
+to avoid creating an exception.
+It will just return the errno value.
+To poll, you can call :meth:`~socket.socket.connect_ex` again later
-- ``0`` or ``errno.EISCONN`` indicate that you're connected -- or you can pass this
socket to :meth:`select.select` to check if it's writable.