On Sat, Jun 9, 2018 at 2:22 AM Adam Bartoš <dre...@gmail.com> wrote:
> The idea was that the functions could handle the PiMultiple instances in a > special way and fall back to float only when a special value is not detected. > It would be like the proposed dsin functionality, but with a magic class > instead of a new set of functions, and without a particular choice of > granularity (360 degrees). > > But maybe it isn't worth it. Also what about acos(0)? Should it return > PiMultiple(1, 2) and confuse people or just 1.5707963267948966 and loose > exactness? > > That'd be the only module in the standard library with such a specialized class and behavior. You could argue that pathlib creates a sort of Path preference with str fallback, but the Path type has a large collection of methods. In contrast, this PiMultiple type would be only used as an input. That's very unusual style for Python.
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/