summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorGiampaolo RodolĂ  <g.rodola@gmail.com>2011-02-25 14:55:52 (GMT)
committerGiampaolo RodolĂ  <g.rodola@gmail.com>2011-02-25 14:55:52 (GMT)
commit63390b3cbb69ff524b940413d7eb70b7a26aee4d (patch)
treeacf0fda4c86c66b0d9ab11a10d2511ef7cf54ac9 /Doc/library
parent3c865231c1982c98831df776459fbf669fea7d37 (diff)
downloadcpython-63390b3cbb69ff524b940413d7eb70b7a26aee4d.zip
cpython-63390b3cbb69ff524b940413d7eb70b7a26aee4d.tar.gz
cpython-63390b3cbb69ff524b940413d7eb70b7a26aee4d.tar.bz2
Merged revisions 88581 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r88581 | giampaolo.rodola | 2011-02-25 15:50:57 +0100 (ven, 25 feb 2011) | 1 line (issue 11232) - fix asyncore documentation issue (patch by Sandro Tosi) ........
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/asyncore.rst5
1 files changed, 3 insertions, 2 deletions
diff --git a/Doc/library/asyncore.rst b/Doc/library/asyncore.rst
index 58691ab..813ac21 100644
--- a/Doc/library/asyncore.rst
+++ b/Doc/library/asyncore.rst
@@ -292,7 +292,7 @@ implement its socket handling::
asyncore Example basic echo server
----------------------------------
-Here is abasic echo server that uses the :class:`dispatcher` class to accept
+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
@@ -302,7 +302,8 @@ connections and dispatches the incoming connections to a handler::
def handle_read(self):
data = self.recv(8192)
- self.send(data)
+ if data:
+ self.send(data)
class EchoServer(asyncore.dispatcher):