Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0fb41b5

Browse files
committed
remove unused import in asyncore doc
1 parent ffa1d0b commit 0fb41b5

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

Doc/library/asynchat.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,9 @@ The :meth:`handle_request` method is called once all relevant input has been
197197
marshalled, after setting the channel terminator to ``None`` to ensure that
198198
any extraneous data sent by the web client are ignored. ::
199199

200+
201+
import asynchat
202+
200203
class http_request_handler(asynchat.async_chat):
201204

202205
def __init__(self, sock, addr, sessions, log):

Doc/library/asyncore.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ asyncore Example basic HTTP client
277277
Here is a very basic HTTP client that uses the :class:`dispatcher` class to
278278
implement its socket handling::
279279

280-
import asyncore, socket
280+
import asyncore
281281

282282
class HTTPClient(asyncore.dispatcher):
283283

@@ -317,7 +317,6 @@ Here is a basic echo server that uses the :class:`dispatcher` class to accept
317317
connections and dispatches the incoming connections to a handler::
318318

319319
import asyncore
320-
import socket
321320

322321
class EchoHandler(asyncore.dispatcher_with_send):
323322

@@ -341,4 +340,3 @@ connections and dispatches the incoming connections to a handler::
341340

342341
server = EchoServer('localhost', 8080)
343342
asyncore.loop()
344-

0 commit comments

Comments
 (0)