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

Function _mk_bitmap

Lib/re/_compiler.py:400–403  ·  view source on GitHub ↗
(bits, _CODEBITS=_CODEBITS, _int=int)

Source from the content-addressed store, hash-verified

398MAXCODE = (1 << _CODEBITS) - 1
399_BITS_TRANS = b'0' + b'1' * 255
400def _mk_bitmap(bits, _CODEBITS=_CODEBITS, _int=int):
401 s = bits.translate(_BITS_TRANS)[::-1]
402 return [_int(s[i - _CODEBITS: i], 2)
403 for i in range(len(s), 0, -_CODEBITS)]
404
405def _bytes_to_codes(b):
406 # Convert block indices to word array

Callers 1

_optimize_charsetFunction · 0.85

Calls 1

translateMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…