fixed default for SITools::Value

pull/544/head
Holger Müller 2022-09-15 08:03:26 +02:00
rodzic 8bc452d48f
commit 36bff6a09d
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 2FDB49E81EAE6622
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -63,7 +63,7 @@ class Format(NamedTuple):
class Value:
CTX = Context(prec=60, Emin=-27, Emax=27)
def __init__(self, value: Real, unit: str = "", fmt=Format()):
def __init__(self, value: Real = Decimal(0), unit: str = "", fmt=Format()):
assert 1 <= fmt.max_nr_digits <= 30
assert -8 <= fmt.min_offset <= fmt.max_offset <= 8
assert fmt.parse_clamp_min < fmt.parse_clamp_max