>> 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 allow
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 simpl
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 simpl
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 generall