Native Python support for units?
Native Python support for units?
Posted Jul 24, 2022 23:41 UTC (Sun) by pdundas (guest, #15203)In reply to: Native Python support for units? by farnz
Parent article: Native Python support for units?
Interestingly you can *multiply* or *divide* distance and time, giving a quantity with a complex unit - speed might be 5m/30s (or 10m/minute, or some other number in furlongs per microfortnight). All kinds of weird and wonderful composite units are available - as some posters mentioned earlier. Or consider electrical units - Amps are Coulombs per second, Volts are Joules per Coulomb, and Watts are Joules per second - or something like that - it's been a while. Which raises interesting possibilities for *display* of numbers with units attached, when they need to be scaled, or converted between families of units that measure the same thing, or expressed (as for Current) in a particular way.
As for how to do that in Pythin, I've no idea. But it's a fascinating problem.