MCPcopy Index your code
hub / github.com/python/cpython / count

Function count

Lib/test/libregrtest/utils.py:103–107  ·  view source on GitHub ↗
(n: int, word: str)

Source from the content-addressed store, hash-verified

101
102
103def count(n: int, word: str) -> str:
104 if n == 1:
105 return f"{n} {word}"
106 else:
107 return f"{n} {word}s"
108
109
110def printlist(x, width=70, indent=4, file=None):

Callers 15

fmeanFunction · 0.85
_rankFunction · 0.85
__init__Method · 0.85
_build_treeFunction · 0.85
test_countMethod · 0.85
test_count_with_stepMethod · 0.85
test_count_threadingMethod · 0.85
test_filterMethod · 0.85
test_filterfalseMethod · 0.85
test_zipMethod · 0.85
test_ziplongestMethod · 0.85
test_mapMethod · 0.85

Calls

no outgoing calls

Tested by 15

test_countMethod · 0.68
test_count_with_stepMethod · 0.68
test_count_threadingMethod · 0.68
test_filterMethod · 0.68
test_filterfalseMethod · 0.68
test_zipMethod · 0.68
test_ziplongestMethod · 0.68
test_mapMethod · 0.68
test_starmapMethod · 0.68
test_isliceMethod · 0.68
test_countMethod · 0.68
isliceMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…