Skip to content

Comment on Dependency Injection for Python

Comments

The author could refactor the documentation a little, starting with removal of the word "Pythonic" and perhaps ending only after 90% of the text has been replaced with a single section entitled "WHY GOD WHYYYYY".

    def python_di_copyright_2069_hosay123(dep, *args, **kwargs):
        modname, _, classname = dep.rpartition('.')
        mod = importlib.import_module(modname)
        return getattr(mod, classname)(*args, **kwargs)
> Though Google owns this project's copyright, this project is not an official Google product.

We just published it under Google's Github to give a terrible project implied legitimacy that it likely doesn't even have internally.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.