diff options
author | John Wiegley <johnw@newartisans.com> | 2007-04-17 07:33:48 +0000 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-04-13 03:35:36 -0400 |
commit | f5956311af0425b6d1fd76752e84bd81a4c8ccd1 (patch) | |
tree | e19b377e5c9c39578bd6183e29b89896c50145af /py_amount.cc | |
parent | 0f2cad4cab7ef99e1ad33be34ea813213da7288d (diff) | |
download | fork-ledger-f5956311af0425b6d1fd76752e84bd81a4c8ccd1.tar.gz fork-ledger-f5956311af0425b6d1fd76752e84bd81a4c8ccd1.tar.bz2 fork-ledger-f5956311af0425b6d1fd76752e84bd81a4c8ccd1.zip |
Completed commodity math tests.
Diffstat (limited to 'py_amount.cc')
-rw-r--r-- | py_amount.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/py_amount.cc b/py_amount.cc index ac36b134..18fd3588 100644 --- a/py_amount.cc +++ b/py_amount.cc @@ -138,10 +138,10 @@ void export_amount() .def(self_ns::int_(self)) .def(self_ns::float_(self)) - .def(self_ns::str(self)) .def(abs(self)) - .def("__repr__", &amount_t::to_string) + .def("__str__", &amount_t::to_string) + .def("__repr__", &amount_t::to_fullstring) .def("has_commodity", &amount_t::has_commodity) @@ -155,9 +155,15 @@ void export_amount() .def("strip_annotations", &amount_t::strip_annotations) .def("clear_commodity", &amount_t::clear_commodity) + //.add_static_property("full_strings", &amount_t::full_strings) + .def("to_string", &amount_t::to_string) + .def("to_fullstring", &amount_t::to_fullstring) .def("quantity_string", &amount_t::quantity_string) + .def("exact", &amount_t::exact) + .staticmethod("exact") + .def("abs", &amount_t::abs) .def("compare", &amount_t::compare) .def("date", &amount_t::date) |