MCPcopy Create free account
hub / github.com/PageBot/PageBot / asInt

Function asInt

Lib/pagebot/toolbox/transformer.py:127–131  ·  view source on GitHub ↗
(value, default=None)

Source from the content-addressed store, hash-verified

125 return default
126
127def asInt(value, default=None):
128 try:
129 return int(value)
130 except (ValueError, TypeError):
131 return default or 0
132
133def isInt(value):
134 return asIntOrNone(value) is not None

Callers 5

findStemsMethod · 0.90
findBarsMethod · 0.90
filterValue2IntFunction · 0.85
idCommaString2IdSetFunction · 0.85
commaString2IntegerListFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected