Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.12] Resolve reference warnings in faq/library.rst (GH-108149) #108182

Merged
merged 1 commit into from
Aug 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions Doc/faq/library.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down Expand Up @@ -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!

Expand Down Expand Up @@ -765,14 +765,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.

Expand Down
1 change: 0 additions & 1 deletion Doc/tools/.nitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ Doc/extending/extending.rst
Doc/extending/newtypes.rst
Doc/faq/design.rst
Doc/faq/gui.rst
Doc/faq/library.rst
Doc/glossary.rst
Doc/howto/descriptor.rst
Doc/howto/enum.rst
Expand Down
Loading