diff --git a/README.rst b/README.rst index c584a3f..b65b147 100644 --- a/README.rst +++ b/README.rst @@ -168,13 +168,11 @@ The injector lifecycle can also be managed asynchronously using the ... injector.exit() -By default, the injector does not provide itself, but will when asked:: +The injector provides itself as the `'injector'` service:: - with Injector(provide_self=True) as injector: + with Injector() as injector: injector.get('injector') -Annotate with note 'injector' to inject the injector. - ``Injector.sub(cls, *mixins_and_dicts, **values)`` -------------------------------------------------- diff --git a/jeni.py b/jeni.py index f8e0efb..a96067d 100644 --- a/jeni.py +++ b/jeni.py @@ -394,12 +394,10 @@ class Injector(BaseInjector): ... injector.exit() - By default, the injector does not provide itself, but will when asked:: + The injector provides itself as the `'injector'` service:: - with Injector(provide_self=True) as injector: + with Injector() as injector: injector.get('injector') - - Annotate with note 'injector' to inject the injector. """ self.annotator = self.annotator_class()