Number#
- class basencode.Number(n: Union[int, float, str, Tuple[Union[int, str]], List[Union[int, str]]], base: int = 10, digits: Optional[List[str]] = None, radix_point: str = '.')#
Constructs a
Floatif a number with a radix point is provided, otherwise anInteger.- Parameters:
n – The number to be converted to decimal and stored
base – The base in which the number provided is represented (this information is used to convert the number to decimal)
digits – The digits used in the provided representation of the number
radix_point – The radix point used in the provided representation of the number, if at all
- Returns:
A
Floatif a number with a radix point is provided, otherwise anInteger- Return type: