]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
New == syntax
authorGuido van Rossum <guido@python.org>
Tue, 19 May 1992 13:51:20 +0000 (13:51 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 19 May 1992 13:51:20 +0000 (13:51 +0000)
Demo/sockets/finger.py
Demo/sockets/telnet.py
Demo/sockets/throughput.py
Demo/sockets/udpecho.py

index 8aa05352c82918704cc0478bf43eb5723120c051..01c0b6cc2e24d7ea0fb6f6f7c0e64e1cfbec6f62 100755 (executable)
@@ -37,7 +37,7 @@ def finger(host, args):
 def main():
        options = ''
        i = 1
-       while i < len(sys.argv) and sys.argv[i][:1] = '-':
+       while i < len(sys.argv) and sys.argv[i][:1] == '-':
                options = options + sys.argv[i] + ' '
                i = i+1
        args = sys.argv[i:]
index 60f832aac9de5ba9bc2bbb4302a83e8d53081a8d..20d14c38fe27300ab07b424cee3c61bcec872ea1 100755 (executable)
@@ -58,7 +58,7 @@ def main():
        #
        pid = posix.fork()
        #
-       if pid = 0:
+       if pid == 0:
                # child -- read stdin, write socket
                while 1:
                        line = sys.stdin.readline()
@@ -82,19 +82,19 @@ def main():
                                        opt = ''
                                elif iac:
                                        iac = 0
-                                       if c = IAC:
+                                       if c == IAC:
                                                cleandata = cleandata + c
                                        elif c in (DO, DONT):
-                                               if c = DO: print '(DO)',
+                                               if c == DO: print '(DO)',
                                                else: print '(DONT)',
                                                opt = IAC + WONT
                                        elif c in (WILL, WONT):
-                                               if c = WILL: print '(WILL)',
+                                               if c == WILL: print '(WILL)',
                                                else: print '(WONT)',
                                                opt = IAC + DONT
                                        else:
                                                print '(command)', ord(c)
-                               elif c = IAC:
+                               elif c == IAC:
                                        iac = 1
                                        print '(IAC)',
                                else:
index 411af9f42e60b7a9e7b3ef99c59b17acd99943f7..6ffcaa80bba7cc9d93c2cd33596fdf9c6b7ecbe1 100755 (executable)
@@ -23,9 +23,9 @@ BUFSIZE = 1024
 def main():
        if len(sys.argv) < 2:
                usage()
-       if sys.argv[1] = '-s':
+       if sys.argv[1] == '-s':
                server()
-       elif sys.argv[1] = '-c':
+       elif sys.argv[1] == '-c':
                client()
        else:
                usage()
index 53dff64ebde345e4bcd0635fce07512a2e7a3778..0e1efc7158930437dcf8abad987d22ad0ab5e5a6 100755 (executable)
@@ -14,9 +14,9 @@ BUFSIZE = 1024
 def main():
        if len(sys.argv) < 2:
                usage()
-       if sys.argv[1] = '-s':
+       if sys.argv[1] == '-s':
                server()
-       elif sys.argv[1] = '-c':
+       elif sys.argv[1] == '-c':
                client()
        else:
                usage()