On Mon, 4 Apr 2022 at 15:20, Brian McCall
<brian.patrick.mcc...@gmail.com> wrote:
>
> Typing "3m + 4cm" into a terminal produced the above output, even if it meant 
> I needed to import the pint module, that would be great. No idea how that 
> would work out, but all for it. argparse still seems like it would be a loose 
> end, though. Although, to be fair, it would be a loose end no matter what.
>

Not sure what the implications of argparse would be?

If the meaning is divided into three as per my previous description,
it absolutely would be possible to "import pint; 3m + 4cm" to get that
result, assuming that pint is enhanced to register itself in this way.
It might work out better to write it as "import pint;
pint.register_si(); print(3m + 4cm)" to explicitly choose the SI unit
set, but that'd be in the hands of the pint maintainers.

ChrisA
_______________________________________________
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/X74MTMNJKIJUJ6ZWPVSK4XWESCSHVTIB/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to