An Empirical Study of Dynamic Types for Python Projects

4Citations
Citations of this article
2Readers
Mendeley users who have this article in their library.
Get full text

Abstract

Python is a well-known dynamically-typed programming language. Due to its dynamic type, Python is flexible to solve complex situations. However, the use of dynamic type may cause many problems on correctness, security and performance. In this paper, we make an empirical study on the dynamic type of Python. First, we collect a dataset with 81 categories from the project list of Awesome Python. Then all Python files in this dataset are analyzed by Pysonar2. Type information is collected and saved for each identifier. Next, we proposed to recognize the dynamic type by comparing the analysis results from Pysonar2. After that, two research questions are put up to investigate the popularity of Python dynamic type in actual programming and the patterns of dynamic type for Python variables. The results show that 6.9% of identifiers in this dataset involve dynamic type and 79.7% of identifiers do not involve dynamic type. Besides, the patterns of dynamic type mainly appear among Transfer assignment methods. Finally, our results give implications such as optimization of naming space to improve the design of Python type system.

Cite

CITATION STYLE

APA

Xia, X., He, X., Yan, Y., Xu, L., & Xu, B. (2018). An Empirical Study of Dynamic Types for Python Projects. In Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) (Vol. 11293 LNCS, pp. 85–100). Springer Verlag. https://doi.org/10.1007/978-3-030-04272-1_6

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free