add cpntributor_database

This commit is contained in:
Rohit Tanwar
2018-02-20 14:39:09 +05:30
parent d04f0260fc
commit 9e26f0ba73
139 changed files with 12881 additions and 12857 deletions

View File

@ -1,3 +1,3 @@
def difference_by(a, b, fn):
b = set(map(fn, b))
def difference_by(a, b, fn):
b = set(map(fn, b))
return [item for item in a if fn(item) not in b]

View File

@ -1,6 +1,6 @@
import types,functools
from pytape import test
from difference_by import difference_by
def difference_by_test(t):
t.true(isinstance(difference_by, (types.BuiltinFunctionType, types.FunctionType, functools.partial)),'difference_by is a function')
import types,functools
from pytape import test
from difference_by import difference_by
def difference_by_test(t):
t.true(isinstance(difference_by, (types.BuiltinFunctionType, types.FunctionType, functools.partial)),'difference_by is a function')
test('Testing difference_by',difference_by_test)