Home
last modified time | relevance | path

Searched refs:countOf (Results 1 – 8 of 8) sorted by relevance

/third_party/python/Lib/test/
Dtest_iter.py700 from operator import countOf
701 self.assertEqual(countOf([1,2,2,3,2,5], 2), 3)
702 self.assertEqual(countOf((1,2,2,3,2,5), 2), 3)
703 self.assertEqual(countOf("122325", "2"), 3)
704 self.assertEqual(countOf("122325", "6"), 0)
706 self.assertRaises(TypeError, countOf, 42, 1)
707 self.assertRaises(TypeError, countOf, countOf, countOf)
711 self.assertEqual(countOf(d, k), 1)
712 self.assertEqual(countOf(d.values(), 3), 3)
713 self.assertEqual(countOf(d.values(), 2j), 1)
[all …]
Dtest_operator.py151 self.assertRaises(TypeError, operator.countOf)
152 self.assertRaises(TypeError, operator.countOf, None, None)
153 self.assertRaises(ZeroDivisionError, operator.countOf, BadIterable(), 1)
154 self.assertEqual(operator.countOf([1, 2, 1, 3, 1, 4], 3), 1)
155 self.assertEqual(operator.countOf([1, 2, 1, 3, 1, 4], 5), 0)
158 self.assertEqual(operator.countOf([nan, nan, 21], nan), 2)
160 self.assertEqual(operator.countOf([{}, 1, {}, 2], {}), 2)
/third_party/python/Lib/
Doperator.py157 def countOf(a, b): function
/third_party/python/Misc/NEWS.d/
D3.10.0b4.rst306 Match the docstring and python implementation of :func:`~operator.countOf`
D3.10.0a1.rst876 :func:`~operator.countOf` of the :mod:`operator` module.
/third_party/python/Doc/library/
Doperator.rst217 .. function:: countOf(a, b)
/third_party/python/Doc/whatsnew/
D3.9.rst267 :func:`~operator.countOf` of the :mod:`operator` module.
/third_party/python/Misc/
DHISTORY24726 operator.countOf() (PySequence_Count() in C API)