def enum(names):
    """Generate an enumeration with the given names.

    The names should be separated with commas and/or whitespace.
    A class is dynamically generated, and an instance is returned.
    Python does not support enumerations, so this is an alternative."""
    names = names.replace(',', ' ').split()
    space = dict((reversed(pair) for pair in enumerate(names)), __slots__=())
    return type('enum', (object,), space)()
Generate an enumeration with the given names.

    The names should be separated with commas and/or whitespace.
    A class is dynamically generated, and an instance is returned.
    Python does not support enumerations, so this is an alternative.
recipes/Python/577046_Bible_Verse_Quiz__statepy/recipe-577046.py