2020/09/05 by Purit Phan-udom, Naruedon Wattanakul, Phan-udom, Purit +11
Computer Science · #Computational Physics and Python Applications #FOS: Computer and information sciences #Software Engineering (cs.SE) #Software Engineering Research
paper · pdf · doi:10.48550/arxiv.2009.03302
openalex publication_date 2020/09/05 · openalex created_date 2022/07/25 · openalex updated_date 2026/07/28
Pythonic code is idiomatic code that follows guiding principles and practices\nwithin the Python community. Offering performance and readability benefits,\nPythonic code is claimed to be widely adopted by experienced Python developers,\nbut can be a learning curve to novice programmers. To aid with Pythonic\nlearning, we create an automated tool, called Teddy, that can help checking the\nPythonic idiom usage. The tool offers a prevention mode with Just-In-Time\nanalysis to recommend the use of Pythonic idiom during code review and a\ndetection mode with historical analysis to run a thorough scan of idiomatic and\nnon-idiomatic code. In this paper, we first describe our tool and an evaluation\nof its performance. Furthermore, we present a case study that demonstrates how\nto use Teddy in a real-life scenario on an Open Source project. An evaluation\nshows that Teddy has high precision for detecting Pythonic idiom and\nnon-Pythonic code. Using interactive visualizations, we demonstrate how novice\nprogrammers can navigate and identify Pythonic idiom and non-Pythonic code in\ntheir projects. Our video demo with the full interactive visualizations is\navailable at https://youtu.be/vOCQReSvBxA.\n