[$] Native Python support for units?

Post Syndicated from original https://lwn.net/Articles/900739/

Back in April, there was an interesting discussion on the python-ideas
mailing list that started as a query about adding support for custom
literals
, a la C++, but branched off from there. Custom literals are
frequently used for handling units and unit conversion in C++, so the
Python discussion fairly quickly focused on that use case. While ideas about a
possible feature were batted about, it does not seem like anything that is
being pursued in earnest, at least at this point. But some of the facets
of the problem are, perhaps surprisingly, more complex than might be guessed.