MCPcopy Create free account
hub / github.com/MapServer/MapServer / plural

Function plural

mapscript/python/examples/shpdump.py:19–25  ·  view source on GitHub ↗

Returns an 's' if plural. Useful in print statements to avoid something like 'point(s)'.

(x)

Source from the content-addressed store, hash-verified

17 sys.exit(2)
18
19def plural(x):
20 """ Returns an 's' if plural.
21
22 Useful in print statements to avoid something like 'point(s)'. """
23 if x > 1:
24 return 's'
25 return ''
26
27
28# Make sure passing in filename argument.

Callers 1

shpdump.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected