In this chapter, we looked at the architectural quality attribute of modifiability, and its various aspects. We discussed readability in some detail, including the readability antipatterns along with a few coding antipatterns. During the discussion, we understood that Python, from its ground up, is a language written for readability.
We looked at the various techniques for improving readability of code, and spent some time with the various aspects of code commenting and looked at documentation strings in Python at the function, class, and module levels. We also looked at PEP-8, the official coding convention guideline for Python, and learned that continuous refactoring of code is important to keep up its modifiability and to reduce its maintenance costs in the long term.
We then looked at some rules of thumb for code comments, and went on to discuss the fundamentals of modifiability, namely, coupling and cohesion of code. We looked at different cases of coupling and cohesion with a...