Change instances of 'while 1:' in the docs into 'while True:'.
diff --git a/Doc/howto/curses.rst b/Doc/howto/curses.rst
index e16d07a..6f53708 100644
--- a/Doc/howto/curses.rst
+++ b/Doc/howto/curses.rst
@@ -377,7 +377,7 @@
 :const:`curses.KEY_HOME`, or :const:`curses.KEY_LEFT`.  Usually the main loop of
 your program will look something like this::
 
-   while 1:
+   while True:
        c = stdscr.getch()
        if c == ord('p'): PrintDocument()
        elif c == ord('q'): break  # Exit the while()
diff --git a/Doc/library/cgi.rst b/Doc/library/cgi.rst
index 84262f5..86b8c47 100644
--- a/Doc/library/cgi.rst
+++ b/Doc/library/cgi.rst
@@ -142,7 +142,7 @@
    if fileitem.file:
        # It's an uploaded file; count lines
        linecount = 0
-       while 1:
+       while True:
            line = fileitem.file.readline()
            if not line: break
            linecount = linecount + 1
diff --git a/Doc/library/logging.rst b/Doc/library/logging.rst
index fb4bc4c..fb21164 100644
--- a/Doc/library/logging.rst
+++ b/Doc/library/logging.rst
@@ -783,7 +783,7 @@
            followed by the LogRecord in pickle format. Logs the record
            according to whatever policy is configured locally.
            """
-           while 1:
+           while True:
                chunk = self.connection.recv(4)
                if len(chunk) < 4:
                    break
diff --git a/Doc/library/smtplib.rst b/Doc/library/smtplib.rst
index 286a725..0653a50 100644
--- a/Doc/library/smtplib.rst
+++ b/Doc/library/smtplib.rst
@@ -322,7 +322,7 @@
    # Add the From: and To: headers at the start!
    msg = ("From: %s\r\nTo: %s\r\n\r\n"
           % (fromaddr, ", ".join(toaddrs)))
-   while 1:
+   while True:
        try:
            line = raw_input()
        except EOFError:
diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst
index 7512e56..19970ad 100644
--- a/Doc/library/socket.rst
+++ b/Doc/library/socket.rst
@@ -734,7 +734,7 @@
    s.listen(1)
    conn, addr = s.accept()
    print('Connected by', addr)
-   while 1:
+   while True:
        data = conn.recv(1024)
        if not data: break
        conn.send(data)
@@ -788,7 +788,7 @@
        sys.exit(1)
    conn, addr = s.accept()
    print('Connected by', addr)
-   while 1:
+   while True:
        data = conn.recv(1024)
        if not data: break
        conn.send(data)