A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2009-June/090184.html below:

[Python-Dev] Adding syntax for units of measure

[Python-Dev] Adding syntax for units of measure [Python-Dev] Adding syntax for units of measureTobias C. Rittweiler tcr at freebits.de
Tue Jun 23 08:47:36 CEST 2009
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 purposes, modifying the BNF is perfectly reasonable, but if you
can depict a good, and convenient!, way that would not result in
modifying it, I'd like to hear it, too.)

Thanks in advance for your input,

  -T.

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4