Hi!
Has anyone added special syntax to allow writing numeric literals with
physical units? So you can write 12m + 34cm, and would get 12.34m.
My question is how would you modify the BNF the most sensible way to
allow for this? The above example is simple, but think of 42 km/h.
(For my
Tobias C. Rittweiler wrote:
Has anyone added special syntax to allow writing numeric literals with
physical units? So you can write 12m + 34cm, and would get 12.34m.
Python-dev is for concrete discussion of development of the next
versions. Questions and speculative discussion should
Tobias C. Rittweiler schrieb:
Hi!
Has anyone added special syntax to allow writing numeric literals with
physical units? So you can write 12m + 34cm, and would get 12.34m.
My question is how would you modify the BNF the most sensible way to
allow for this? The above example is simple, but
Tobias C. Rittweiler schrieb:
Hi!
Has anyone added special syntax to allow writing numeric literals with
physical units? So you can write 12m + 34cm, and would get 12.34m.
My question is how would you modify the BNF the most sensible way to
allow for this? The above example is simple, but
Has anyone added special syntax to allow writing numeric literals with
physical units? So you can write 12m + 34cm, and would get 12.34m.
...
Georg normally you wouldn't add units to the language itself.
...
Georg For the interactive shell, using a wrapper that allows