def __init__(self, value=0, length=0):
		"""Creates a Bitset with the given integer value."""
		self.value = value
		try: self.length = length or math.floor(math.log(value, 2)) + 1
		except Exception: self.length = 0
Creates a Bitset with the given integer value.
recipes/Python/576738_Bitset/recipe-576738.py