Hi Paul, > Agreed, it is appealing. The problem (and this is not a new > suggestion, it's come up a number of times) is that of having language > syntax depend on non-builtin classes. So either you have to *also* > propose making the fractions module a builtin
That is absolutely what I would like to have. The fractions module is very small, it can easily be made a builtin. This would also speed it up significantly, I hope. Probably close to the speed of floats, given that most of the time spent for floats is whithin the interpreter anyways. > Personally, I can see value in fraction, decimal and regex literals. > But I can live without them. This is why I proposed not to make a new literal. With my proposal, I already served two of your proposed use cases: fractions and decimal. Decimal(1/3) would be perfectly fine. Plus symbolic math. Effectively what I am proposing is lazy evaluation of the divison operator, using fractions as a mathematical tool. Cheers Martin _______________________________________________ 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/XGCW7SFBQAB6LO5ASGIE6JMGMLNCTMMH/ Code of Conduct: http://python.org/psf/codeofconduct/