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

Function plural

Lib/test/libregrtest/utils.py:94–100  ·  view source on GitHub ↗
(n: int, singular: str, plural: str | None = None)

Source from the content-addressed store, hash-verified

92
93
94def plural(n: int, singular: str, plural: str | None = None) -> str:
95 if n == 1:
96 return singular
97 elif plural is not None:
98 return plural
99 else:
100 return singular + 's'
101
102
103def count(n: int, word: str) -> str:

Callers 4

__str__Method · 0.85
list_regexMethod · 0.85
check_executed_testsMethod · 0.85
start_workersMethod · 0.85

Calls

no outgoing calls

Tested by 2

list_regexMethod · 0.68
check_executed_testsMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…