Just lending support to all of these comments. These are universal problems and far far from specific to electrical engineering. In civil we talk about strains and moments; strains are unitless, but they still carry a unit (e.g., in/in) and those units are important. We also talk about moments, which are the same dimensions as for energy (FORCE X LENGTH) but a wholly different thing with different unit expression (e.g., kip X ft). And there is also torque, which is the same units as a moment, but a different concept and you probably shouldn't be adding them together even though they are exactly the same units (someone might want to argue with me about that, I'm unsure).
There is also the 2nd moment of area per length, which is the same dimensions as volume but we express it in different units than volume (in4/in), and there is section modulus per length, which is the same dimensions as area but different units (in3/in), and area per length, which is the same as length, but different units (in2/in or in2/ft). There is also the concept of loads: pressure loads (lbs/sq ft or psi), linear loads (lbs/ft, kips/in, etc), and these probably come out to have the same dimensions are other concepts in other disciplines that should not to be added to them.
Since the concept of what a unit means is very very complex, what Chris A is saying about punting these responsibilities out to others is very powerful idea. I'm uncertain whether the idea of just calling functions as the consequence of applying unit tag to a number is the right solution (but I'm not against it).
I wonder if having a totally separated namespace for the "unit slot" makes some kind of sense. Maybe you say something like:
from pint.SI import as units meter as m, kilogram as kg
from pint.US_Customary import as units feet as ft, pounds_force as lbf
<<NOTE THE "as units" part above!!!>>
...and with the above "as units" imports you can say:
m = "mosquito"
lbf = "low battery freakout"
kg = "kill goliath"
ft = "foolish tolkien"
x = 2m
y = 5kg
a = 4.0ft
b = 4.1lbf
...etc. etc., and you have a unit namespace separate from the regular namespace. The m and lbf and ft and kg in these spaces never conflict.
---
Ricky.
"I've never met a Kentucky man who wasn't either thinking about going home or actually going home." - Happy Chandler