The method currently looks like this:
|
def register(self, fn): |
|
self._registry[fn.__name__] = fn |
|
# Clear caches: |
|
self._graph = None |
|
self._reversed = None |
This isn't yet documented. Also it would be neat if you could do this:
registry.register(lambda x: x.upper(), name="upper")
If name= is not provided it can default to fn.__name__.
The method currently looks like this:
asyncinject/asyncinject/__init__.py
Lines 21 to 25 in fd5ef10
This isn't yet documented. Also it would be neat if you could do this:
If
name=is not provided it can default tofn.__name__.