def taxonomy(value):
    """
    Any ASCII character goes into a taxonomy, except spaces.
    """
    try:
        value.encode('ascii')
    except UnicodeEncodeError:
        raise ValueError('tag %r is not ASCII' % value)
    if re.search(r'\s', value):
        raise ValueError('The taxonomy %r contains whitespace chars' % value)
    return value
Any ASCII character goes into a taxonomy, except spaces.