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

Function _is_single_bit

tools/python-3.11.9-amd64/Lib/enum.py:93–100  ·  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

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

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