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

Function selective_len

Lib/encodings/punycode.py:22–28  ·  view source on GitHub ↗

Return the length of str, considering only characters below max.

(str, max)

Source from the content-addressed store, hash-verified

20 return base.take_bytes(), extended
21
22def selective_len(str, max):
23 """Return the length of str, considering only characters below max."""
24 res = 0
25 for c in str:
26 if ord(c) < max:
27 res += 1
28 return res
29
30def selective_find(str, char, index, pos):
31 """Return a pair (index, pos), indicating the next occurrence of

Callers 1

insertion_unsortFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…