(s)
return s
assert type of s is basestring and convert s to unicode
assert type of s is basestring and convert s to unicode
assert type of s is basestring and convert s to unicode
def ensure_unicode(s):
    """assert type of s is basestring and convert s to unicode"""
    assert isinstance(s, basestring), 's should be string' + str(s)
    if isinstance(s, str):
        s = s.decode('utf-8')
    return s
def ensure_unicode ( s ) : assert isinstance ( s , basestring ) , 's should be string' + str ( s ) if isinstance ( s , str ) : s = s . decode ( 'utf-8' ) return s