Popis: |
Veterans within the Python community claim that the usage of Pythonic idiomatic writing style is usually preferred. Because of its conciseness and ease of understanding, the idiomatic code tends to be more efficient and less error-prone code. With the growth of Python developers outside the Python community, it is not certain to what extent how Python idiomatic code is used in real software projects, especially if there are consequences. In this paper, our aim is to understand when and how developers start to use idioms in their software projects. Specifically, we propose a technique to visualize and understand the usage of the with open Pythonic idiom, one of the popular idioms. Two visualizations are proposed: (1) a visualization of evolution of non-idiomatic and idiomatic style of writing in four Python software projects over time and (2) a visualization to show the amount of appearing and disappearing idioms by comparing from the first and the latest version of the projects. The results show that developers tend to adopt the idiomatic code over time. We also found that, in three out of the four projects, the developers fixed their code during the evolution of the software to improve their Pythonic coding styles. |