Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/TurtleArt/tapalette.py
diff options
context:
space:
mode:
authorWalter Bender <walter.bender@gmail.com>2013-05-05 12:22:37 (GMT)
committer Walter Bender <walter.bender@gmail.com>2013-05-05 12:22:37 (GMT)
commit530ac9230d7774ed2409d1e45420e1922e05bf53 (patch)
treeba1bd85107d15b72a7dd2b006833d09fb86868f3 /TurtleArt/tapalette.py
parentfba8e527fd22b61f0e94b0f87073ead603db61e3 (diff)
change type()== to isisintance
Diffstat (limited to 'TurtleArt/tapalette.py')
-rw-r--r--TurtleArt/tapalette.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/TurtleArt/tapalette.py b/TurtleArt/tapalette.py
index 2d903e5..cda2b79 100644
--- a/TurtleArt/tapalette.py
+++ b/TurtleArt/tapalette.py
@@ -138,7 +138,7 @@ class Palette():
else:
i = len(palette_names)
- if position is not None and type(position) is int and position < i:
+ if position is not None and isinstance(position, int) and position < i:
i = position
if self._name not in palette_names:
@@ -193,7 +193,7 @@ class Palette():
if not hidden:
first_arg = None
if special_name is None:
- if type(label) == list:
+ if isinstance(label, list):
first_arg = label[0]
else:
first_arg = label
@@ -294,7 +294,7 @@ class Block():
debug_output('%s already in palette %s, skipping...' % (
self._name, self._palette))
else:
- if position is not None and type(position) is int and \
+ if position is not None and isinstance(position, int) and \
position < len(palette_blocks[i]):
palette_blocks[i].insert(position, self._name)
else:
@@ -365,13 +365,13 @@ class Block():
self._special_name = name
def set_label(self, label):
- if type(label) == type([]):
+ if isinstance(label, list):
self._label = label[:]
else:
self._label = [label]
def set_default(self, default):
- if type(default) == type([]):
+ if isinstance(default, list):
self._default = default[:]
else:
self._default = [default]