summaryrefslogtreecommitdiff
path: root/python/py_value.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-04 19:55:27 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-04 19:55:27 -0400
commit2d941730b1c60342be5b108d2d654723b3b7c2cb (patch)
tree6a3f4b7305857e85d2684670492007bafc3668d0 /python/py_value.cc
parent73cf3b01fbd50c3a8a4fd96ff69643c28394d8fe (diff)
downloadledger-2d941730b1c60342be5b108d2d654723b3b7c2cb.tar.gz
ledger-2d941730b1c60342be5b108d2d654723b3b7c2cb.tar.bz2
ledger-2d941730b1c60342be5b108d2d654723b3b7c2cb.zip
Largely removed all of Ledger's use of global variables, for the REPL's sake.
Diffstat (limited to 'python/py_value.cc')
-rw-r--r--python/py_value.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/python/py_value.cc b/python/py_value.cc
index 80952d7d..59be1d33 100644
--- a/python/py_value.cc
+++ b/python/py_value.cc
@@ -54,15 +54,15 @@ boost::optional<value_t> py_value_2(const value_t& amount,
return amount.value(moment, in_terms_of);
}
-string py_print(const value_t& value) {
+string py_dump(const value_t& value) {
std::ostringstream buf;
- value.print(buf);
+ value.dump(buf);
return buf.str();
}
-string py_print_relaxed(const value_t& value) {
+string py_dump_relaxed(const value_t& value) {
std::ostringstream buf;
- value.print(buf, true);
+ value.dump(buf, true);
return buf.str();
}
@@ -255,8 +255,8 @@ void export_value()
.def("to_string", &value_t::to_string)
.def("to_sequence", &value_t::to_sequence)
- .def("__str__", py_print_relaxed)
- .def("__repr__", py_print)
+ .def("__str__", py_dump_relaxed)
+ .def("__repr__", py_dump)
.def("cast", &value_t::cast)
.def("in_place_cast", &value_t::in_place_cast)