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

Function warm_caches

Lib/test/libregrtest/refleak.py:285–293  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

283
284
285def warm_caches() -> None:
286 # char cache
287 s = bytes(range(256))
288 for i in range(256):
289 s[i:i+1]
290 # unicode cache
291 [chr(i) for i in range(256)]
292 # int cache
293 list(range(-5, 257))

Callers 1

runtest_refleakFunction · 0.85

Calls 1

listClass · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…