MCPcopy Index your code
hub / github.com/RustPython/RustPython / _is_single_bit

Function _is_single_bit

Lib/enum.py:90–97  ·  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

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

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