ivankorobkov / python-inject

Python dependency injection
Apache License 2.0
694 stars 79 forks source link

binding to a "name" #9

Closed spinus closed 10 years ago

spinus commented 10 years ago

I play with this library for a moment, and I wanted bind some instance to ... name.

binder.bind("config", {"some": "example"})

then

inject.instance("config")

and it works. I like it even it is not intentional. Maybe it is worth to put some code example with such a usage?

ivankorobkov commented 10 years ago

Hi! Good proposal, I'll update the docs.

spinus commented 10 years ago

Nice, thanks.