Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


I 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


   from pint.units import meter, cm
:) Or whatever you fancy! I'm just someone in the comment section after all.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: