-
Notifications
You must be signed in to change notification settings - Fork 137
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
raw() and value() is error prone #307
Comments
This change also prevented us from updating to the latest development version, as we were not sure if it will be kept like that or if we would need to again revert all the adaptions for the next stable release. |
@nholthaus Is there any interest to restore the old behavior? If so, I could send you a PR and introduce |
See also
|
It appears the old behavior might have been a bug, as the original intent was for |
Please include the following information in your issue:
units
you are using3.x (commit 70d5e3f)
We have an older version of the units lib (3.x, 2b2c063) where all units could be accessed with the
value()
method and you got the expected values. Later, this behavior changed for dimensionless units. This leads to unexpected behavior and actually our unit tests are failing now for thepercent
unit.Our proposal is to introduce a unit
proportion
instead and fall back to the old behavior where the value of 5 percent actually returns 5 and not 0.05.The text was updated successfully, but these errors were encountered: