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

Function _is_single_bit

Lib/enum.py:91–98  ·  view source on GitHub ↗

True if only one bit set in num (should be an int)

(num)

Source from the content-addressed store, hash-verified

89 return False
90
91def _is_single_bit(num):
92 """
93 True if only one bit set in num (should be an int)
94 """
95 if num == 0:
96 return False
97 num &= num - 1
98 return num == 0
99
100def _make_class_unpicklable(obj):
101 """

Callers 5

__set_name__Method · 0.85
__new__Method · 0.85
global_flag_reprFunction · 0.85
convert_classFunction · 0.85
__call__Method · 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…