| 157 | } |
| 158 | |
| 159 | PyObject* QuantityPy::getUserPreferred(PyObject* /*args*/) const |
| 160 | { |
| 161 | std::string uus; |
| 162 | double factor {}; |
| 163 | Py::Tuple res(3); |
| 164 | |
| 165 | auto uss = getQuantityPtr()->getUserString(factor, uus); |
| 166 | |
| 167 | res[0] = Py::String(uss, "utf-8"); |
| 168 | res[1] = Py::Float(factor); |
| 169 | res[2] = Py::String(uus, "utf-8"); |
| 170 | |
| 171 | return Py::new_reference_to(res); |
| 172 | } |
| 173 | |
| 174 | PyObject* QuantityPy::getValueAs(PyObject* args) const |
| 175 | { |