Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better way to change the representation of a quantity #6

Open
cjrh opened this issue Mar 30, 2015 · 0 comments
Open

Better way to change the representation of a quantity #6

cjrh opened this issue Mar 30, 2015 · 0 comments

Comments

@cjrh
Copy link
Owner

cjrh commented Mar 30, 2015

Currently, the way to change the default representation of an object is like so:

>>> from misu import *
>>> x = 100 * kg/hr
>>> print(x)  # Default
100 kg/hr
>>> x.setRepresent(g/s, 'g/s')
>>> print(x)
27.78 g/s

Unfortunately, there seems no easy way to drop the 'g/s' string parameter. One way might be to only have a string parameter (if that can be successfuly evaled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant