2 ms·
While we are making improvements to examples, I would want to read code that looks like this: >>> 3 * units.meter + 4 * units.cm So the `units` variable s
by kzrdude 5y ago
While we are making improvements to examples, I would want to read code that looks like this:
>>> 3 * units.meter + 4 * units.cm
So the `units` variable should be named that way to accommodate.
- wodenokoto 5y agoI also spend way to long looking at the `UnitRegister()` and `ureg` class and object names. I'm not a fan of either. To the point where I'm wondering about the feasibility of having the API work like: from pint.default import meter, cm length = 3 * meter + 4 * cm
- kzrdude 5y agofrom pint.units import meter, cm :) Or whatever you fancy! I'm just someone in the comment section after all.