We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 96164f8 commit 71b3c32Copy full SHA for 71b3c32
1 file changed
example_code/item_37.py
@@ -66,16 +66,12 @@ def run(self):
66
67
68
# Example 6
69
-import select
70
-import socket
71
-
72
-# This is for supporting Windows specifically. Windows can't do a
73
-# select call with an empty list. Don't connect the socket to anything.
74
-# Waiting for it will do nothing.
75
-_s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+import select, socket
76
+# Creating the socket is specifically to support Windows. Windows can't do
+# a select call with an empty list.
77
def slow_systemcall():
78
- select.select([_s], [], [], 0.1)
+ select.select([socket.socket()], [], [], 0.1)
79
80
81
# Example 7
0 commit comments