@@ -111,7 +111,7 @@ Is there an equivalent to C's onexit() in Python?
111
111
-------------------------------------------------
112
112
113
113
The :mod:` atexit` module provides a register function that is similar to C's
114
- :c:func:` onexit` .
114
+ :c:func:` ! onexit` .
115
115
116
116
117
117
Why don't my signal handlers work?
@@ -397,7 +397,7 @@ These aren't::
397
397
D[x] = D[x] + 1
398
398
399
399
Operations that replace other objects may invoke those other objects'
400
- :meth:` __del__` method when their reference count reaches zero, and that can
400
+ :meth:` ~object. __del__` method when their reference count reaches zero, and that can
401
401
affect things. This is especially true for the mass updates to dictionaries and
402
402
lists. When in doubt, use a mutex!
403
403
@@ -765,14 +765,17 @@ The :mod:`select` module is commonly used to help with asynchronous I/O on
765
765
sockets.
766
766
767
767
To prevent the TCP connect from blocking, you can set the socket to non-blocking
768
- mode. Then when you do the :meth:` socket.connect` , you will either connect immediately
768
+ mode. Then when you do the :meth:` ~socket.socket.connect` ,
769
+ you will either connect immediately
769
770
(unlikely) or get an exception that contains the error number as ` ` .errno` ` .
770
771
` ` errno.EINPROGRESS` ` indicates that the connection is in progress, but hasn't
771
772
finished yet. Different OSes will return different values, so you're going to
772
773
have to check what's returned on your system.
773
774
774
- You can use the :meth:` socket.connect_ex` method to avoid creating an exception. It will
775
- just return the errno value. To poll, you can call :meth:` socket.connect_ex` again later
775
+ You can use the :meth:` ~socket.socket.connect_ex` method
776
+ to avoid creating an exception.
777
+ It will just return the errno value.
778
+ To poll, you can call :meth:` ~socket.socket.connect_ex` again later
776
779
-- ` ` 0` ` or ` ` errno.EISCONN` ` indicate that you're connected -- or you can pass this
777
780
socket to :meth:` select.select` to check if it's writable.
778
781
0 commit comments