Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ActiveState/code
/ plural
Function
plural
recipes/Python/546532_PyChecker_postprocessor/recipe-546532.py:231–235 ·
view source on GitHub ↗
Format a plural string.
(n, unit)
Source
from the content-addressed store, hash-verified
229
230
231
def
plural(n, unit):
232
''
&
#x27;Format a plural string.
233
''
&
#x27;
234
s =
's'
if
n != 1
else
''
235
return
'%s %s%s'
% (n or
'no'
, unit, s)
236
237
238
def
quoted(text):
Callers
6
convertToHumanReadable
Function · 0.85
allist
Method · 0.85
get
Method · 0.85
run
Method · 0.85
warnings
Method · 0.85
main
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected