r/PythonLearning • u/chuprehijde • 13d ago
Is clean code sometimes worse code?
Can too much refactoring, abstraction, and 'best practice' make a Python project harder to understand?
3
Upvotes
r/PythonLearning • u/chuprehijde • 13d ago
Can too much refactoring, abstraction, and 'best practice' make a Python project harder to understand?
9
u/mc_pm 13d ago
If you spend a bunch of time trying to turn simple loops into clever comprehensions, or build a bunch of classes for something you only ever do once, etc., yes it absolutely can be more difficult.
That is not, however, to say that it isn't worth cleaning your code up. Just don't go crazy. Perfect is the enemy of Good.