MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / _is_private

Function _is_private

tools/python-3.11.9-amd64/Lib/enum.py:79–91  ·  view source on GitHub ↗
(cls_name, name)

Source from the content-addressed store, hash-verified

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

Callers 2

__setitem__Method · 0.85
convert_classFunction · 0.85

Calls 1

startswithMethod · 0.80

Tested by

no test coverage detected