Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/TurtleArt/tacanvas.py
diff options
context:
space:
mode:
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))