Hacker News new | ask | show | jobs
by sltkr 702 days ago
The topic is too complex to do it justice in a Hacker News comment, especially since it's one of those things that takes some time and practical experience for the concept to “click”.

A good starting point is this article (though it's a little outdated): https://martinfowler.com/articles/injection.html

DI is not very common in Python, for a variety of reasons, but there apparently are DI frameworks, like: https://python-dependency-injector.ets-labs.org/index.html