]> granicus.if.org Git - python/commitdiff
remove unused import in asyncore doc
authorGiampaolo Rodola' <g.rodola@gmail.com>
Tue, 15 May 2012 13:46:00 +0000 (15:46 +0200)
committerGiampaolo Rodola' <g.rodola@gmail.com>
Tue, 15 May 2012 13:46:00 +0000 (15:46 +0200)
Doc/library/asynchat.rst
Doc/library/asyncore.rst

index 75b3cdaad36c66b86012d099f2b939e56f63abb5..55c61d7e68f35b27e6c2e62083e80615e8d4180e 100644 (file)
@@ -197,6 +197,9 @@ The :meth:`handle_request` method is called once all relevant input has been
 marshalled, after setting the channel terminator to ``None`` to ensure that
 any extraneous data sent by the web client are ignored. ::
 
+
+   import asynchat
+
    class http_request_handler(asynchat.async_chat):
 
        def __init__(self, sock, addr, sessions, log):
index 87506596a6a8f84d7d6f8275d024d69da51c3730..7cacca1941efe5d4d6b14575c86ba40fe3d450ce 100644 (file)
@@ -277,7 +277,7 @@ asyncore Example basic HTTP client
 Here is a very basic HTTP client that uses the :class:`dispatcher` class to
 implement its socket handling::
 
-   import asyncore, socket
+   import asyncore
 
    class HTTPClient(asyncore.dispatcher):
 
@@ -317,7 +317,6 @@ Here is a basic echo server that uses the :class:`dispatcher` class to accept
 connections and dispatches the incoming connections to a handler::
 
     import asyncore
-    import socket
 
     class EchoHandler(asyncore.dispatcher_with_send):
 
@@ -341,4 +340,3 @@ connections and dispatches the incoming connections to a handler::
 
     server = EchoServer('localhost', 8080)
     asyncore.loop()
-