From 0a6b5726ec3bf402a953ea8a03b98ecbf4b90b0c Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 19 Apr 2007 20:31:46 +0000 Subject: 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. --- py_amount.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'py_amount.cc') 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) -- cgit v1.2.3