You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TrangOulmannequin opened this issue
Aug 12, 2020
· 6 comments
Labels
3.7 (EOL)end of life3.8only security fixes3.9only security fixes3.10only security fixesperformancePerformance or resource usagestdlibPython modules in the Lib dir
"Turtle" module is closely related to geometry, which is also covered by "math" (and "cmath") module. Nevertheless, in many places in "turtle" the wheel is being reinvented. Currently, only π and basing trig functions are used.
Performance may be improved by such refactor (for example, by using "math.hypot" instead of manual calculation of vector norm).
Well, if you want to exploit Python features in full, I'd suggest cmath as even better library. Turtle position is just a complex numbers, and cmath has direct conversion from and to polar coordinates, which is all that's needed for basic commands. :-)
You could post a suggested replacement for a couple of the expressions, with the warning that we would not necessarily use it. math.hypot has recently be worked over so that it is perhaps more accurate than the standard C version.
3.7 (EOL)end of life3.8only security fixes3.9only security fixes3.10only security fixesperformancePerformance or resource usagestdlibPython modules in the Lib dir
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: