|
|
|
@ -1,7 +1,24 @@
|
|
|
|
|
|
|
|
|
|
class Bit:
|
|
|
|
|
"""
|
|
|
|
|
Provide a flexible bit representation
|
|
|
|
|
Provide a flexible bit representation.
|
|
|
|
|
|
|
|
|
|
Extended description of function.
|
|
|
|
|
|
|
|
|
|
Parameters
|
|
|
|
|
----------
|
|
|
|
|
var : bool | int | str | Bit
|
|
|
|
|
Any of the supported objects which can be converted to a Bit object.
|
|
|
|
|
bool: True or False
|
|
|
|
|
int: 0 = False, anything else = True
|
|
|
|
|
str: "0" = False, anything else = True
|
|
|
|
|
BIT: Bit = Bit
|
|
|
|
|
|
|
|
|
|
Returns
|
|
|
|
|
-------
|
|
|
|
|
Bit
|
|
|
|
|
A binary representation of True or False with additional useful
|
|
|
|
|
features.
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def __init__(self, var):
|
|
|
|
|