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

Function safe_range

Tools/gdb/libpython.py:128–131  ·  view source on GitHub ↗
(val)

Source from the content-addressed store, hash-verified

126
127
128def safe_range(val):
129 # As per range, but don't trust the value too much: cap it to a safety
130 # threshold in case the data was corrupted
131 return range(safety_limit(int(val)))
132
133class StringTruncated(RuntimeError):
134 pass

Callers 11

iteritemsMethod · 0.85
proxyvalMethod · 0.85
write_reprMethod · 0.85
proxyvalMethod · 0.85
iter_localsMethod · 0.85
__iter__Method · 0.85
__str__Method · 0.85
proxyvalMethod · 0.85
write_reprMethod · 0.85
proxyvalMethod · 0.85

Calls 1

safety_limitFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…