On 5/14/21 5:12 AM, Martin Teichmann wrote: > In order to showcase how that would look like, let me give an example session: > > >>> 5/6-4/15 > 17/30 > >>> a=22/7 > >>> f"{a}" > '22/7' > >>> f"{a:f}" > '3.142857' > >>> from decimal import Decimal > >>> Decimal(1/3) > Decimal('0.3333333333333333333333333333')
This looks very interesting! I see some confusion on all sides on what, exactly, you are proposing. As best as I can figure, the rules for your conversions are something like (where .div. is division and .op. is any other operation):
1) int .div. int --> fraction 2) int .op. fraction --> fraction 3) fraction .op. non-fraction --> float What I am not sure of: 4) fraction .op. fraction --> ??? 5) fraction .op. non-fraction --> ??? Am I correct on 1-3? What are you proposing as regards 4 and 5? -- ~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/GIHYCE2R32FXCNAWYJR3S3ICAH7KMCED/ Code of Conduct: http://python.org/psf/codeofconduct/