ImportError: cannot import name 'StringType' - Stack Overflow
stackoverflow.com › questions › 45508380Aug 04, 2017 · def writeValue (self, value, stream, indent): if isinstance (self, Mapping): indstr = ' ' else: indstr = indent * ' ' if isinstance (value, Reference) or isinstance (value, Expression): stream.write ('%s%r%s' % (indstr, value, NEWLINE)) else: if (type (value) is StringType): # and not isWord (value): value = repr (value) stream.write ('%s%s%s' % (indstr, value, NEWLINE))