environment/lib/python2.7/site-packages/nose/util.py
def regex_last_key(regex):
    """Sort key function factory that puts items that match a
    regular expression last.

    >>> from nose.config import Config
    >>> from nose.pyversion import sort_list
    >>> c = Config()
    >>> regex = c.testMatch
    >>> entries = ['.', '..', 'a_test', 'src', 'lib', 'test', 'foo.py']
    >>> sort_list(entries, regex_last_key(regex))
    >>> entries
    ['.', '..', 'foo.py', 'lib', 'src', 'a_test', 'test']
    """
    def k(obj):
        if regex.search(obj):
            return (1, obj)
        return (0, obj)
    return k
def regex_last_key(regex):
    def k(obj):
        if regex.search(obj):
            return (1, obj)
        return (0, obj)
    return k
def regex_last_key ( regex ) : def k ( obj ) : if regex . search ( obj ) : return ( 1 , obj ) return ( 0 , obj ) return k
Sort key function factory that puts items that match a
    regular expression last.

    >>> from nose.config import Config
    >>> from nose.pyversion import sort_list
    >>> c = Config()
    >>> regex = c.testMatch
    >>> entries = ['.', '..', 'a_test', 'src', 'lib', 'test', 'foo.py']
    >>> sort_list(entries, regex_last_key(regex))
    >>> entries
    ['.', '..', 'foo.py', 'lib', 'src', 'a_test', 'test']
Sort key function factory that puts items that match a regular expression last .