mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Get rid of most of the remaining uses of <>. There's still Tools/* thogh.
This commit is contained in:
parent
c4996ba794
commit
3bd844e695
16 changed files with 23 additions and 49 deletions
|
@ -163,7 +163,7 @@ class NFSClient(UDPClient):
|
|||
ra = (dir, 0, 2000)
|
||||
while 1:
|
||||
(status, rest) = self.Readdir(ra)
|
||||
if status <> NFS_OK:
|
||||
if status != NFS_OK:
|
||||
break
|
||||
entries, eof = rest
|
||||
last_cookie = None
|
||||
|
|
|
@ -78,7 +78,7 @@ class Packer:
|
|||
self.pack_uint(0)
|
||||
|
||||
def pack_farray(self, n, list, pack_item):
|
||||
if len(list) <> n:
|
||||
if len(list) != n:
|
||||
raise ValueError, 'wrong array size'
|
||||
for item in list:
|
||||
pack_item(item)
|
||||
|
@ -183,7 +183,7 @@ class Unpacker:
|
|||
while 1:
|
||||
x = self.unpack_uint()
|
||||
if x == 0: break
|
||||
if x <> 1:
|
||||
if x != 1:
|
||||
raise RuntimeError, '0 or 1 expected, got %r' % (x, )
|
||||
item = unpack_item()
|
||||
list.append(item)
|
||||
|
|
|
@ -74,7 +74,7 @@ def makestatus(name, thisuser):
|
|||
ubytes = ubytes + bytes
|
||||
users[user] = ujobs, ubytes
|
||||
else:
|
||||
if fields and fields[0] <> 'Rank':
|
||||
if fields and fields[0] != 'Rank':
|
||||
line = string.strip(line)
|
||||
if line == 'no entries':
|
||||
line = name + ': idle'
|
||||
|
@ -84,7 +84,7 @@ def makestatus(name, thisuser):
|
|||
#
|
||||
if totaljobs:
|
||||
line = '%d K' % ((totalbytes+1023)/1024)
|
||||
if totaljobs <> len(users):
|
||||
if totaljobs != len(users):
|
||||
line = line + ' (%d jobs)' % totaljobs
|
||||
if len(users) == 1:
|
||||
line = line + ' for %s' % (users.keys()[0],)
|
||||
|
|
|
@ -18,7 +18,7 @@ def primes(min, max):
|
|||
while i <= max:
|
||||
for p in primes:
|
||||
if i%p == 0 or p*p > i: break
|
||||
if i%p <> 0:
|
||||
if i%p != 0:
|
||||
primes.append(i)
|
||||
if i >= min: print i
|
||||
i = i+2
|
||||
|
|
|
@ -83,7 +83,7 @@ def main():
|
|||
print 'Funny line:', line,
|
||||
continue
|
||||
filename, lineno = prog.group(1, 2)
|
||||
if not curfile or filename <> curfile.filename:
|
||||
if not curfile or filename != curfile.filename:
|
||||
if curfile: curfile.finish()
|
||||
curfile = FileObj(filename)
|
||||
curfile.process(lineno, line[n:])
|
||||
|
|
|
@ -246,7 +246,7 @@ def browse_search(selector, host, port):
|
|||
def browse_telnet(selector, host, port):
|
||||
if selector:
|
||||
print 'Log in as', repr(selector)
|
||||
if type(port) <> type(''):
|
||||
if type(port) != type(''):
|
||||
port = repr(port)
|
||||
sts = os.system('set -x; exec telnet ' + host + ' ' + port)
|
||||
if sts:
|
||||
|
|
|
@ -115,11 +115,11 @@ def spawn(prog, args):
|
|||
os.close(i)
|
||||
except os.error:
|
||||
pass
|
||||
if os.dup(p2cread) <> 0:
|
||||
if os.dup(p2cread) != 0:
|
||||
sys.stderr.write('popen2: bad read dup\n')
|
||||
if os.dup(c2pwrite) <> 1:
|
||||
if os.dup(c2pwrite) != 1:
|
||||
sys.stderr.write('popen2: bad write dup\n')
|
||||
if os.dup(c2pwrite) <> 2:
|
||||
if os.dup(c2pwrite) != 2:
|
||||
sys.stderr.write('popen2: bad write dup\n')
|
||||
for i in range(3, MAXFD):
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue