def unregister(matcher):
    """ Unregister a matcher (or alias) from the registry
    """
    # If it's a string handle it like an alias
    if isinstance(matcher, text_types) and matcher in matchers:
        matcher = matchers[matcher]

    # Find all aliases associated to the matcher
    aliases = [k for k, v in matchers.iteritems() if v == matcher]
    for alias in aliases:
        del matchers[alias]
        # Clean up the normalized versions
        norms = [k for k, v in normalized.iteritems() if v == alias]
        for norm in norms:
            del normalized[norm]

    # Remove help docstring
    if matcher in helpmatchers:
        del helpmatchers[matcher]

    return len(aliases) > 0
def unregister ( matcher ) : if isinstance ( matcher , text_types ) and matcher in matchers : matcher = matchers [ matcher ] aliases = [ k for k , v in matchers . iteritems ( ) if v == matcher ] for alias in aliases : del matchers [ alias ] norms = [ k for k , v in normalized . iteritems ( ) if v == alias ] for norm in norms : del normalized [ norm ] if matcher in helpmatchers : del helpmatchers [ matcher ] return len ( aliases ) > 0
Unregister a matcher (or alias) from the registry