]> granicus.if.org Git - python/commitdiff
Fix indentation and class name in socket howto example.
authorEzio Melotti <ezio.melotti@gmail.com>
Fri, 27 Jun 2014 13:34:14 +0000 (16:34 +0300)
committerEzio Melotti <ezio.melotti@gmail.com>
Fri, 27 Jun 2014 13:34:14 +0000 (16:34 +0300)
Doc/howto/sockets.rst

index c04fd5577f658dd35a94a7c19436aefff23e9f13..d5aff9081d232e89d214ebf37db915af3bccc469 100644 (file)
@@ -180,7 +180,7 @@ righter than others).
 Assuming you don't want to end the connection, the simplest solution is a fixed
 length message::
 
-   class mysocket:
+   class MySocket:
        """demonstration class only
          - coded for clarity, not efficiency
        """
@@ -189,8 +189,8 @@ length message::
            if sock is None:
                self.sock = socket.socket(
                                socket.AF_INET, socket.SOCK_STREAM)
-               else:
-                   self.sock = sock
+           else:
+               self.sock = sock
 
        def connect(self, host, port):
            self.sock.connect((host, port))