Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/TurtleArt/tacanvas.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/tacanvas.py
parentfba8e527fd22b61f0e94b0f87073ead603db61e3 (diff)
change type()== to isisintance
Diffstat (limited to 'TurtleArt/tacanvas.py')
-rw-r--r--TurtleArt/tacanvas.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/TurtleArt/tacanvas.py b/TurtleArt/tacanvas.py
index 1d07784..e446e46 100644
--- a/TurtleArt/tacanvas.py
+++ b/TurtleArt/tacanvas.py
@@ -619,9 +619,9 @@ class TurtleGraphics:
fd = pango.FontDescription('Sans')
fd.set_size(int(size * scale) * pango.SCALE)
pl.set_font_description(fd)
- if type(label) == str or type(label) == unicode:
+ if isinstance(label, (str, unicode)):
pl.set_text(label.replace('\0', ' '))
- elif type(label) == float or type(label) == int:
+ elif isinstance(label, (float, int)):
pl.set_text(str(label))
else:
pl.set_text(str(label))