-
Notifications
You must be signed in to change notification settings - Fork 2
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
Find out why pint doesn't allow registry mixing #112
Comments
@seanpearsonuk @dnwillia @ansaboutin
Sharing response given by |
So reading that it does allow some comparisons but it’s not considering their units equivalent for some reason. It’s still weird, and their answers don’t really help me. |
Here, one approach is mentioned using https://pint.readthedocs.io/en/0.7.2/tutorial.html#using-pint-in-your-projects |
Right, so you can instantiate multiple registries, but they isolate the units to a registry and explicitly disallow combining them perhaps because of this design decision: "There are no global units in Pint". The behaviour does seem to be as in your screenshots (below) but I'm still not sure why they have imposed this limitation other than just establishing it as a convention (i.e. this is just a rule we have and it's the way it is).
|
Yes, right. |
We can ask pint in github
We think it might be to enforce consistent mixing of units (e.g. GB vs US gallons)
The text was updated successfully, but these errors were encountered: