Garavani, Michele
(2026)
Code Commenting Practices In Python Projects Across Development Eras: An Empirical Study.
[Laurea], Università di Bologna, Corso di Studio in
Informatica [L-DM270]
Documenti full-text disponibili:
Abstract
Source code comments are a basic tool for documenting software systems, but how developers actually use them changes over time. As languages evolve, tools improve, and habits shift. This thesis looks at that change in Python over roughly twenty years.
Sixteen open-source Python repositories were selected, eight from the 2000s and eight from the 2020s. A custom pipeline extracted comment blocks and measured density, structure, function, and wording. Docstrings and test code were included to round out the picture of how each project handled documentation.
The differences between the two eras are fairly consistent. Modern repositories have fewer comment blocks per line of code, more inline comments, and less multi-line comment sections. TODO has largely taken over from FIXME and XXX as the annotation marker of
choice. Comments meant to be processed by automated tools, such as linters, appear far more often in recent code. Linguistically, comments show a shift towards a more formal syntax.
Overall, the findings indicate that commenting practices in Python have changed. Specifically, comments are now shorter, more focused and formal, and increasingly written with tools in mind rather than just future readers.
Abstract
Source code comments are a basic tool for documenting software systems, but how developers actually use them changes over time. As languages evolve, tools improve, and habits shift. This thesis looks at that change in Python over roughly twenty years.
Sixteen open-source Python repositories were selected, eight from the 2000s and eight from the 2020s. A custom pipeline extracted comment blocks and measured density, structure, function, and wording. Docstrings and test code were included to round out the picture of how each project handled documentation.
The differences between the two eras are fairly consistent. Modern repositories have fewer comment blocks per line of code, more inline comments, and less multi-line comment sections. TODO has largely taken over from FIXME and XXX as the annotation marker of
choice. Comments meant to be processed by automated tools, such as linters, appear far more often in recent code. Linguistically, comments show a shift towards a more formal syntax.
Overall, the findings indicate that commenting practices in Python have changed. Specifically, comments are now shorter, more focused and formal, and increasingly written with tools in mind rather than just future readers.
Tipologia del documento
Tesi di laurea
(Laurea)
Autore della tesi
Garavani, Michele
Relatore della tesi
Scuola
Corso di studio
Ordinamento Cds
DM270
Parole chiave
python,python code,code,code comments,comments,source code,commenting practices,open-source,empirical analysis,docstrings,analysis,2000s,2020s,annotations,tooling,TODO,comment blocks
Data di discussione della Tesi
27 Marzo 2026
URI
Altri metadati
Tipologia del documento
Tesi di laurea
(NON SPECIFICATO)
Autore della tesi
Garavani, Michele
Relatore della tesi
Scuola
Corso di studio
Ordinamento Cds
DM270
Parole chiave
python,python code,code,code comments,comments,source code,commenting practices,open-source,empirical analysis,docstrings,analysis,2000s,2020s,annotations,tooling,TODO,comment blocks
Data di discussione della Tesi
27 Marzo 2026
URI
Statistica sui download
Gestione del documento: