Extends this export. The instance created by the wrapped factory is extended by passing the created instance to the given extend function after creation. The extend function must accept the instance as its only argument. If the function returns a value which is not
(self, extend)
| 38 | |
| 39 | |
| 40 | def extend(self, extend): |
| 41 | ''' Extends this export. |
| 42 | |
| 43 | The instance created by the wrapped factory is extended by passing the |
| 44 | created instance to the given extend function after creation. |
| 45 | |
| 46 | The extend function must accept the instance as its only argument. If |
| 47 | the function returns a value which is not None, the instance is replaced |
| 48 | with the returned value. |
| 49 | ''' |
| 50 | |
| 51 | assert self.__instance is None |
| 52 | |
| 53 | self.__extends.append(extend) |
| 54 | |
| 55 | |
| 56 | @property |
no outgoing calls
no test coverage detected