def create_not_function(v):
    return lambda s, *args, **kw: not v(s, *args, **kw)
for k, v in list(_dict.items()):
    if hasattr(v, '__call__'):
        extended_dict['not_' + k] = create_not_function(v)
varargs in lambda functions in Python