summaryrefslogtreecommitdiff
path: root/py_amount.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2007-04-19 20:31:46 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 03:38:28 -0400
commit0a6b5726ec3bf402a953ea8a03b98ecbf4b90b0c (patch)
tree0a2c2aca7100d045f491b03f0a5bda92378d3ef9 /py_amount.cc
parent176b3044e355398a0c31e0c42a3cd7b8a2e3f3e5 (diff)
downloadfork-ledger-0a6b5726ec3bf402a953ea8a03b98ecbf4b90b0c.tar.gz
fork-ledger-0a6b5726ec3bf402a953ea8a03b98ecbf4b90b0c.tar.bz2
fork-ledger-0a6b5726ec3bf402a953ea8a03b98ecbf4b90b0c.zip
Made the amount/balance/value interface a bit more rational; added
back a useless version of the register command (just to prove the command sequence); and added smart XML semantics to the XPath implementation so that nodes can be coerced to values.
Diffstat (limited to 'py_amount.cc')
-rw-r--r--py_amount.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/py_amount.cc b/py_amount.cc
index ef69d2b9..7c27e095 100644
--- a/py_amount.cc
+++ b/py_amount.cc
@@ -136,7 +136,6 @@ void export_amount()
.def(self_ns::int_(self))
.def(self_ns::float_(self))
- .def(abs(self))
.def("__str__", &amount_t::to_string)
.def("__repr__", &amount_t::to_fullstring)
@@ -162,18 +161,16 @@ void export_amount()
.def("exact", &amount_t::exact)
.staticmethod("exact")
- .def("abs", &amount_t::abs)
+ .def("__abs__", &amount_t::abs)
.def("compare", &amount_t::compare)
.def("date", &amount_t::date)
.def("negate", &amount_t::negate)
- .def("negated", &amount_t::negated)
.def("null", &amount_t::null)
.def("parse", py_parse_1)
.def("parse", py_parse_2)
.def("price", &amount_t::price)
.def("realzero", &amount_t::realzero)
.def("reduce", &amount_t::reduce)
- .def("reduced", &amount_t::reduced)
.def("round", py_round_1)
.def("round", py_round_2)
.def("sign", &amount_t::sign)