Convert from unicode to native ascii

def convert(data):
    """
    Convert from unicode to native ascii
    """
    try:
        st = basestring
    except NameError:
        st = str
    if isinstance(data, st):
        return str(data)
    elif isinstance(data, Mapping):
        return dict(map(convert, data.iteritems()))
    elif isinstance(data, Iterable):
        return type(data)(map(convert, data))
    else:
        return data