On 4/9/22 21:17, Stephen J. Turnbull wrote:

     if 12*u.mm * 42*u.MFr == 502*u.foo:
         print('Well done!')

That would work fine for me.  But I can see why somebody who
frequently uses interactive Python as a scientific calculator would
prefer to write

     if 12 m/s * 42 s == 502 m:
         print('Well done!')

with the base SI repertoire (a dozen or so prefixes and 7 units) in
builtins.

Part of the argument as well, I think, is that the top expression would be 
parsed as:

    ((12 * u.m) * 42) * u.MFr

which, if actually equal to 502*u.foo, is dumb luck.

--
~Ethan~
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/NL5CLKGOUMHCHJIITEM5XUG5L2D2XPCK/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to