diff options
author | Guido van Rossum <guido@python.org> | 2006-08-24 03:53:23 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2006-08-24 03:53:23 (GMT) |
commit | b053cd8f40dd19985b16f50661640dcefb69888f (patch) | |
tree | 88e1c2ce636a6df402a97c51ea9067a46735120a /Lib/plat-mac | |
parent | 01c77c66289f8e9c8d15b8da623fae4014ec2edb (diff) | |
download | cpython-b053cd8f40dd19985b16f50661640dcefb69888f.zip cpython-b053cd8f40dd19985b16f50661640dcefb69888f.tar.gz cpython-b053cd8f40dd19985b16f50661640dcefb69888f.tar.bz2 |
Killed the <> operator. You must now use !=.
Opportunistically also fixed one or two places where '<> None' should be
'is not None' and where 'type(x) <> y' should be 'not isinstance(x, y)'.
Diffstat (limited to 'Lib/plat-mac')
-rw-r--r-- | Lib/plat-mac/FrameWork.py | 8 | ||||
-rw-r--r-- | Lib/plat-mac/buildtools.py | 2 | ||||
-rw-r--r-- | Lib/plat-mac/cfmfile.py | 6 | ||||
-rw-r--r-- | Lib/plat-mac/gensuitemodule.py | 8 | ||||
-rw-r--r-- | Lib/plat-mac/macerrors.py | 2 |
5 files changed, 13 insertions, 13 deletions
diff --git a/Lib/plat-mac/FrameWork.py b/Lib/plat-mac/FrameWork.py index cda38e4..0bd6feb 100644 --- a/Lib/plat-mac/FrameWork.py +++ b/Lib/plat-mac/FrameWork.py @@ -602,7 +602,7 @@ class Menu: def dispatch(self, id, item, window, event): title, shortcut, callback, mtype = self.items[item-1] if callback: - if not self.bar.parent or type(callback) <> types.StringType: + if not self.bar.parent or not isinstance(callback, str): menuhandler = callback else: # callback is string @@ -748,7 +748,7 @@ class Window: self.parent = parent def open(self, bounds=(40, 40, 400, 400), resid=None): - if resid <> None: + if resid is not None: self.wid = GetNewWindow(resid, -1) else: self.wid = NewWindow(bounds, self.__class__.__name__, 1, @@ -826,7 +826,7 @@ class Window: # If we're not frontmost, select ourselves and wait for # the activate event. # - if MyFrontWindow() <> window: + if MyFrontWindow() != window: window.SelectWindow() return # We are. Handle the event. @@ -875,7 +875,7 @@ class ControlsWindow(Window): if DEBUG: print "control hit in", window, "on", control, "; pcode =", pcode def do_inContent(self, partcode, window, event): - if MyFrontWindow() <> window: + if MyFrontWindow() != window: window.SelectWindow() return (what, message, when, where, modifiers) = event diff --git a/Lib/plat-mac/buildtools.py b/Lib/plat-mac/buildtools.py index c83e218..7c5d0f4 100644 --- a/Lib/plat-mac/buildtools.py +++ b/Lib/plat-mac/buildtools.py @@ -192,7 +192,7 @@ def process_common(template, progress, code, rsrcname, destname, is_update, 'icl8', 'ics4', 'ics8', 'ICN#', 'ics#'] if not copy_codefragment: skiptypes.append('cfrg') -## skipowner = (ownertype <> None) +## skipowner = (ownertype != None) # Copy the resources from the template diff --git a/Lib/plat-mac/cfmfile.py b/Lib/plat-mac/cfmfile.py index fd1a3e8..df157fd 100644 --- a/Lib/plat-mac/cfmfile.py +++ b/Lib/plat-mac/cfmfile.py @@ -73,7 +73,7 @@ class CfrgResource: Res.CloseResFile(resref) Res.UseResFile(currentresref) self.parse(data) - if self.version <> 1: + if self.version != 1: raise error, "unknown 'cfrg' resource format" def parse(self, data): @@ -143,7 +143,7 @@ class FragmentDescriptor: return data def getfragment(self): - if self.where <> 1: + if self.where != 1: raise error, "can't read fragment, unsupported location" f = open(self.path, "rb") f.seek(self.offset) @@ -155,7 +155,7 @@ class FragmentDescriptor: return frag def copydata(self, outfile): - if self.where <> 1: + if self.where != 1: raise error, "can't read fragment, unsupported location" infile = open(self.path, "rb") if self.length == 0: diff --git a/Lib/plat-mac/gensuitemodule.py b/Lib/plat-mac/gensuitemodule.py index 983e0f9..53c0a52 100644 --- a/Lib/plat-mac/gensuitemodule.py +++ b/Lib/plat-mac/gensuitemodule.py @@ -169,7 +169,7 @@ def processfile_fromresource(fullname, output=None, basepkgname=None, aete = decode(data, verbose) aetelist.append((aete, res.GetResInfo())) finally: - if rf <> cur: + if rf != cur: CloseResFile(rf) UseResFile(cur) # switch back (needed for dialogs in Python) @@ -332,7 +332,7 @@ def getpstr(f, *args): def getalign(f): if f.tell() & 1: c = f.read(1) - ##if c <> '\0': + ##if c != '\0': ## print align:', repr(c) def getlist(f, description, getitem): @@ -779,7 +779,7 @@ class SuiteCompiler: if is_enum(a[2]): kname = a[1] ename = a[2][0] - if ename <> '****': + if ename != '****': fp.write(" aetools.enumsubst(_arguments, %r, _Enum_%s)\n" % (kname, identify(ename))) self.enumsneeded[ename] = 1 @@ -810,7 +810,7 @@ class SuiteCompiler: for a in arguments: if is_enum(a[2]): ename = a[2][0] - if ename <> '****': + if ename != '****': self.enumsneeded[ename] = 1 # diff --git a/Lib/plat-mac/macerrors.py b/Lib/plat-mac/macerrors.py index ce2a118..faa5244 100644 --- a/Lib/plat-mac/macerrors.py +++ b/Lib/plat-mac/macerrors.py @@ -1574,7 +1574,7 @@ smFHBlkDispErr = -311 #Error occurred during _sDisposePtr (Dispose of FHea smFHBlockRdErr = -310 #Error occurred during _sGetFHeader. smBLFieldBad = -309 #ByteLanes field was bad. smUnExBusErr = -308 #Unexpected BusError -smResrvErr = -307 #Fatal reserved error. Resreved field <> 0. +smResrvErr = -307 #Fatal reserved error. Resreved field != 0. smNosInfoArray = -306 #No sInfoArray. Memory Mgr error. smDisabledSlot = -305 #This slot is disabled (-305 use to be smLWTstBad) smNoDir = -304 #Directory offset is Nil |