[Python-ideas] real numbers with SI scale factors
Nikolaus Rath
Nikolaus at rath.org
Wed Aug 31 13:31:22 EDT 2016
On Aug 29 2016, Ken Kundert <python-ideas-jl/PDlM0qtzz1n+OaKNE4w at public.gmane.org> wrote:
> Nikolaus,
> I have belatedly realized that this kind of hyperbole is counter productive.
> So let me back away from that statement and instead try to understand your
> reasons for not liking the proposal.
>
> Do you think there is no value to be able to naturally read and write numbers
> with SI scale factors from Python? Or is your issue with something about my
> proposal?
* I think there is no value gained by being able to write 32.3m instead
of 32.3e6. I think the second one is clear to everyone who uses SI
prefixes, while the first one just introduces a lot of
complexities. Most of them have been mentioned already:
- no deducible ordering if one doesn't know the prefixes
- potential for ambiguity with Exa
- question about base 2 vs base 10, e.g what do you expect to be
stored in *size* if you reed this:
"size = 10M # we need that many bytes"
- rather abitrary naming ("M" and "m" vs "T" and "p").
* I think having SI *Unit* support "32.3 kN" would be nice, but only if
there is a space between number and unit, and only if the unit
actually get's attached to the number. But your proposal would
result in 1km + 1µN == 2 being true.
Best,
-Nikolaus
--
GPG encrypted emails preferred. Key id: 0xD113FCAC3C4E599F
Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F
»Time flies like an arrow, fruit flies like a Banana.«
More information about the Python-ideas
mailing list