turtle-graphicspython-turtle

Is there any practical use for the turtle module in Python?


Is there any practical use for the turtle module in Python? It is good for practicing graphics, but is that all the module is good for? It's objectively slow, yet new versions of Python continue to keep this outdated graphic module.

I've looked online, and found this post on Reddit: Real-world uses for turtle? The consensus appears to be that turtle is only good for teaching and practicing, and has no place in real-world applications.

I also found this post Is the turtle module in python just a learning tool which got closed as opinion-based. I am not looking for an opinion-based answer but an objective explanation of whether this module would ever be a practical tool in any real-world application.


Solution

  • From the official documentation (emphasis mine):

    It’s an effective and well-proven way for learners to encounter programming concepts and interaction with software, as it provides instant, visible feedback. It also provides convenient access to graphical output in general.

    Turtle drawing was originally created as an educational tool, to be used by teachers in the classroom. For the programmer who needs to produce some graphical output it can be a way to do that without the overhead of introducing more complex or external libraries into their work.

    Also I would submit that education is practical, and a way to explore iterative programming concepts visually, and easily experiment with programmatic drawing without all the very complex overhead of production-ready graphic systems is its own kind of real-world application.

    If your question is should you use it in high performance production application contexts, probably not. If your question is should it be dropped from python because it is not practical or useful, also probably not. But here we are getting into opinions.