MCPcopy Index your code
hub / github.com/clips/pattern / num_value

Function num_value

pattern/web/pdf/pdftypes.py:107–113  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

105 return x
106
107def num_value(x):
108 x = resolve1(x)
109 if not (isinstance(x, int) or isinstance(x, float)):
110 if STRICT:
111 raise PDFTypeError('Int or Float required: %r' % x)
112 return 0
113 return x
114
115def str_value(x):
116 x = resolve1(x)

Callers 1

__init__Method · 0.90

Calls 2

resolve1Function · 0.85
PDFTypeErrorClass · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…