def utfstr(stuff):
 if isinstance(stuff, basestring):
  return stuff
 else:
  return str(stuff)

def utfstr ( stuff ) : if isinstance ( stuff , basestring ) : return stuff else : return str ( stuff )
converts stuff to string and does without failing if stuff is a utf8 string .