|
|
Subscribe / Log in / New account

Native Python support for units?

Native Python support for units?

Posted Jul 14, 2022 1:10 UTC (Thu) by tialaramex (subscriber, #21167)
In reply to: Native Python support for units? by pj
Parent article: Native Python support for units?

Currency traders are, as their name implies, buying and selling currency, and so necessarily that's not a conversion. If I buy 14 carrots for 85 pence, that's not a conversion between pence and carrots, it's a purchase. Likewise if I buy 85 Euros for 90 Dollars, that was a purchase and not a conversion, even if I attempt it at the same moment I can't also sell 85 Euros for 90 Dollars, I will find that (because people doing this want to make money on their transactions) my 85 Euros sells for rather less than 90 Dollars even though that's what it cost me.

In contrast if I have 0.0508 metres of something I also have 2 inches of it, that's a conversion, I don't have less of it or more of it, I just changed my units of measurement.

The thornier case is situations where arguably there is a conversion, but pragmatically that's never going to be what you meant. If I have a kilogram, and I want joules, I probably need to re-examine my priors rather than use Einstein's famous equation which gives a very large number indeed for this conversion.


to post comments

Native Python support for units?

Posted Jul 30, 2022 17:00 UTC (Sat) by Wol (subscriber, #4433) [Link]

> Likewise if I buy 85 Euros for 90 Dollars, that was a purchase and not a conversion, even if I attempt it at the same moment I can't also sell 85 Euros for 90 Dollars,

??? Isn't that exactly what the guy on the other side of your trade just DID?

Whether the transaction is reversible has nothing to do with the transaction, and everything to do with whether the parties are trading or buying/selling.

Cheers,
Wol


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds