Skip to content

Commit 7d9f471

Browse files
Ken KundertKen Kundert
authored andcommitted
add USD conversions; improve documentation of prec preference
1 parent 90dde78 commit 7d9f471

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

quantiphy/quantiphy.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -942,10 +942,10 @@ def set_prefs(cls, **kwargs):
942942
*QuantiPhy* currently does not add leading plus signs to either
943943
mantissa or exponent, so this setting is ignored.
944944
945-
:arg int prec:
946-
Default precision in digits where 0 corresponds to 1 digit. Must
947-
be nonnegative. This precision is used when the full precision is
948-
not required. Default is 4.
945+
:arg prec:
946+
Default precision in digits where 0 corresponds to 1 digit. Must
947+
be a nonnegative integer or "full". This precision is used when the
948+
full precision is not required. Default is 4.
949949
:type prec: int or str
950950
951951
:arg dict preferred_units:
@@ -3736,7 +3736,8 @@ def __str__(self):
37363736
UnitConversion('b bit bits', 'B byte bytes', 8)
37373737
UnitConversion('bps b/s', 'Bps B/s', 8)
37383738

3739-
# Bitcoin conversions {{{2
3739+
# Currency conversions {{{2
3740+
UnitConversion(['$'], ['USD'], 1)
37403741
UnitConversion(['sat', 'sats', 'ș'], ['BTC', 'btc', 'Ƀ', '₿', '฿'], 1e8)
37413742

37423743

0 commit comments

Comments
 (0)