コード例 #1
0
 def test_except2(self):
     linq1 = Linq([2.0, -2.0, 2.1, -2.2, 2.3, 2.4, 2.5, 2.3])
     linq2 = Linq([2.1, 2.2])
     assert_equal(linq1.except_(linq2, key_f=lambda x: abs(x)),
                  Linq([2.0, -2.0, 2.3, 2.4, 2.5, 2.3]))
コード例 #2
0
 def test_except(self):
     linq1 = Linq([2.0, 2.0, 2.1, 2.2, 2.3, 2.4, 2.5])
     linq2 = Linq([2.1, 2.2])
     assert_equal(linq1.except_(linq2), Linq([2.0, 2.0, 2.3, 2.4, 2.5]))