parameters: (self, config)
return_statement: return result
docstring: Configure an object with a user-supplied factory.
docstring_summary: Configure an object with a user-supplied factory.
docstring_tokens: Configure an object with a user - supplied factory .
function: def configure_custom(self, config):
          """Configure an object with a user-supplied factory."""
          c = config.pop('()')
          if not callable(c):
              c = self.resolve(c)
          props = config.pop('.', None)
          # Check for valid identifiers
          kwargs = {k: config[k] for k in config if valid_ident(k)}
          result = c(**kwargs)
          if props:
              for name, value in props.items():
                  setattr(result, name, value)
          return result
function_tokens: def configure_custom ( self , config ) : c = config . pop ( '()' ) if not callable ( c ) : c = self . resolve ( c ) props = config . pop ( '.' , None ) # Check for valid identifiers kwargs = { k : config [ k ] for k in config if valid_ident ( k ) } result = c ( * * kwargs ) if props : for name , value in props . items ( ) : setattr ( result , name , value ) return result