def s3_str(s):
 if (type(s) is str):
  return s
 else:
  return s3_unicode(s).encode('utf-8', 'strict')

def s3_str ( s ) : if ( type ( s ) is str ) : return s else : return s3_unicode ( s ) . encode ( 'utf-8' , 'strict' )
unicode-safe conversion of an object s into a utf-8 encoded str .