GnuCash
5.6-150-g038405b370+
|
Public Member Functions | |
def | __init__ (self, args, kargs) |
def | __lt__ (a, b) |
def | __gt__ (a, b) |
def | __le__ (a, b) |
def | __ge__ (a, b) |
def | __eq__ (a, b) |
def | __bool__ (a) |
def | __float__ (self) |
def | __int__ (self) |
def | __pos__ (a) |
def | __neg__ (a) |
def | __abs__ (a) |
def | to_fraction (self) |
def | __str__ (self) |
Public Member Functions inherited from python.gnucash_core.GnuCashCoreClass | |
def | do_lookup_create_oo_instance (self, lookup_function, cls, args) |
Object used by GnuCash to store all numbers. Always consists of a numerator and denominator. The constants GNC_DENOM_AUTO, GNC_HOW_RND_FLOOR, GNC_HOW_RND_CEIL, GNC_HOW_RND_TRUNC, GNC_HOW_RND_PROMOTE, GNC_HOW_RND_ROUND_HALF_DOWN, GNC_HOW_RND_ROUND_HALF_UP, GNC_HOW_RND_ROUND, GNC_HOW_RND_NEVER, GNC_HOW_DENOM_EXACT, GNC_HOW_DENOM_REDUCE, GNC_HOW_DENOM_LCD, and GNC_HOW_DENOM_FIXED are available for arithmetic functions like GncNumeric.add Look at gnc-numeric.h to see how to use these
Definition at line 517 of file gnucash_core.py.
def python.gnucash_core.GncNumeric.__init__ | ( | self, | |
args, | |||
kargs | |||
) |
Constructor that supports the following formats: * No arguments defaulting to zero: eg. GncNumeric() == 0/1 * A integer: e.g. GncNumeric(1) == 1/1 * Numerator and denominator intager pair: eg. GncNumeric(1, 2) == 1/2 * A floating point number: e.g. GncNumeric(0.5) == 1/2 * A floating point number with defined conversion: e.g. GncNumeric(0.5, GNC_DENOM_AUTO, GNC_HOW_DENOM_FIXED | GNC_HOW_RND_NEVER) == 1/2 * A string: e.g. GncNumeric("1/2") == 1/2
Definition at line 532 of file gnucash_core.py.
def python.gnucash_core.GncNumeric.__abs__ | ( | a | ) |
abs(a)
Definition at line 704 of file gnucash_core.py.
def python.gnucash_core.GncNumeric.__bool__ | ( | a | ) |
a != 0
Definition at line 686 of file gnucash_core.py.
def python.gnucash_core.GncNumeric.__eq__ | ( | a, | |
b | |||
) |
a == b
Definition at line 682 of file gnucash_core.py.
def python.gnucash_core.GncNumeric.__ge__ | ( | a, | |
b | |||
) |
a >= b
Definition at line 678 of file gnucash_core.py.
def python.gnucash_core.GncNumeric.__gt__ | ( | a, | |
b | |||
) |
a > b
Definition at line 670 of file gnucash_core.py.
def python.gnucash_core.GncNumeric.__le__ | ( | a, | |
b | |||
) |
a <= b
Definition at line 674 of file gnucash_core.py.
def python.gnucash_core.GncNumeric.__lt__ | ( | a, | |
b | |||
) |
a < b
Definition at line 666 of file gnucash_core.py.
def python.gnucash_core.GncNumeric.__neg__ | ( | a | ) |
-a
Definition at line 700 of file gnucash_core.py.
def python.gnucash_core.GncNumeric.__pos__ | ( | a | ) |
+a
Definition at line 696 of file gnucash_core.py.
def python.gnucash_core.GncNumeric.__str__ | ( | self | ) |
Returns a human readable numeric value string as UTF8.
Definition at line 712 of file gnucash_core.py.