jeni-python icon indicating copy to clipboard operation
jeni-python copied to clipboard

FactoryProvider breaks name-only factories

Open groner opened this issue 10 years ago • 0 comments

The following no longer works since FactoryProvider was written.

@Injector.factory('foo')
def get_foo(name):
    return 'foo '+name

The fix is to call the nameless form lazily (and write a test).

As a workaround, make name optional.

groner avatar Sep 02 '15 19:09 groner