Chapter 9. Keeping things lightweight
This chapter covers
- Using complexity measurements to identify code to refactor
- Python language features for breaking up code
- Using Python language features to support backward compatibility
In your software development, you’ll remain vigilant about separating concerns, but you’ll generally wait until a sensible organization presents itself in order to avoid creating the wrong abstractions. This means your classes will generally grow bit by bit until they become unruly.
This is quite like the art of training a bonsai tree; you need to give the tree time to grow, and only after it tells you where it’s headed can you encourage it down that path. Trimming the tree too often can stress it, and forcing it into ...
Get Practices of the Python Pro now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.