summaryrefslogtreecommitdiffstats
path: root/Lib/plat-mac
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2007-04-11 19:24:50 (GMT)
committerGeorg Brandl <georg@python.org>2007-04-11 19:24:50 (GMT)
commit57b39e0916d741d9851ac875d8f443bfc6005def (patch)
tree582159ea9ac83512264eb4ecb442f4bf19e7712f /Lib/plat-mac
parentb5ddcfd2a203336f3ba7bb1111cda462333c9e1f (diff)
downloadcpython-57b39e0916d741d9851ac875d8f443bfc6005def.zip
cpython-57b39e0916d741d9851ac875d8f443bfc6005def.tar.gz
cpython-57b39e0916d741d9851ac875d8f443bfc6005def.tar.bz2
Bug #1697782: remove all remaining code that uses types.InstanceType.
Diffstat (limited to 'Lib/plat-mac')
-rw-r--r--Lib/plat-mac/aetypes.py3
-rw-r--r--Lib/plat-mac/findertools.py4
2 files changed, 3 insertions, 4 deletions
diff --git a/Lib/plat-mac/aetypes.py b/Lib/plat-mac/aetypes.py
index 14e48d6..9dfb39f 100644
--- a/Lib/plat-mac/aetypes.py
+++ b/Lib/plat-mac/aetypes.py
@@ -518,8 +518,7 @@ class ComponentItem(SelectableItem):
ss = repr(seld)
elif IsRange(seld):
start, stop = seld.start, seld.stop
- if type(start) == InstanceType == type(stop) and \
- start.__class__ == self.__class__ == stop.__class__:
+ if type(start) == type(stop) == type(self):
ss = str(start.seld) + " thru " + str(stop.seld)
else:
ss = str(seld)
diff --git a/Lib/plat-mac/findertools.py b/Lib/plat-mac/findertools.py
index 282cc27..6c12419 100644
--- a/Lib/plat-mac/findertools.py
+++ b/Lib/plat-mac/findertools.py
@@ -484,8 +484,8 @@ def windowposition(folder, pos=None):
openwindow(fsr)
if not pos:
return _getwindowposition(folder_alias)
- if type(pos) == InstanceType:
- # pos might be a QDPoint object as returned by _getwindowposition
+ if aetypes.IsQDPoint(pos):
+ # QDPoint object as returned by _getwindowposition
pos = (pos.h, pos.v)
return _setwindowposition(folder_alias, pos)