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

Function _is_private

Lib/enum.py:78–89  ·  view source on GitHub ↗
(cls_name, name)

Source from the content-addressed store, hash-verified

76 return qualname == s_pattern or qualname.endswith(e_pattern)
77
78def _is_private(cls_name, name):
79 # do not use `re` as `re` imports `enum`
80 pattern = '_%s__' % (cls_name, )
81 pat_len = len(pattern)
82 if (
83 len(name) > pat_len
84 and name.startswith(pattern)
85 and (name[-1] != '_' or name[-2] != '_')
86 ):
87 return True
88 else:
89 return False
90
91def _is_single_bit(num):
92 """

Callers 2

__setitem__Method · 0.85
convert_classFunction · 0.85

Calls 1

startswithMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…