Changed all type checking to use isinstance

This commit is contained in:
John (J5) Palmieri
2006-10-03 17:06:48 -04:00
parent 7c342e75bf
commit 6f337e0b14
7 changed files with 43 additions and 43 deletions
+1 -1
View File
@@ -374,7 +374,7 @@ class SVGelement:
f.write('\n'+'\t'*(level+2)+line)
f.write('\n'+'\t'*(level+1)+']]>\n')
if self.text:
if type(self.text)==type(''): #If the text is only text
if isinstance(self.text, str): #If the text is only text
f.write(_escape(str(self.text)))
else: #If the text is a spannedtext class
f.write(str(self.text))