def _slugify(string):
    """
    This is not as good as a proper slugification function, but the input space is limited

    >>> _slugify("beets")
    'beets'
    >>> _slugify("Toaster Strudel")
    'toaster-strudel'


    Here's why: It handles very little. It doesn't handle esoteric whitespace or symbols:

    >>> _slugify("Hat\\nBasket- of justice and some @#*(! symbols")
    'hat-basket-of-justice-and-some-symbols'

    """
    words = re.split(r'[\W]', string)
    clean_words = [w for w in words if w != '']
    return '-'.join(clean_words).lower()
def _slugify ( string ) : words = re . split ( r'[\W]' , string ) clean_words = [ w for w in words if w != '' ] return '-' . join ( clean_words ) . lower ( )
This is not as good as a proper slugification function, but the input space is limited

    >>> _slugify("beets")
    'beets'
    >>> _slugify("Toaster Strudel")
    'toaster-strudel'


    Here's why: It handles very little. It doesn't handle esoteric whitespace or symbols:

    >>> _slugify("Hat\\nBasket- of justice and some @#*(! symbols")
    'hat-basket-of-justice-and-some-symbols'