MCPcopy Index your code
hub / github.com/fluentpython/example-code-2e / execute

Method execute

21-async/mojifinder/bottle.py:3398–3412  ·  view source on GitHub ↗
(self, _stdout, kwargs)

Source from the content-addressed store, hash-verified

3396 return self.cache[_name].execute(env['_stdout'], env)
3397
3398 def execute(self, _stdout, kwargs):
3399 env = self.defaults.copy()
3400 env.update(kwargs)
3401 env.update({'_stdout': _stdout, '_printlist': _stdout.extend,
3402 'include': functools.partial(self._include, env),
3403 'rebase': functools.partial(self._rebase, env), '_rebase': None,
3404 '_str': self._str, '_escape': self._escape, 'get': env.get,
3405 'setdefault': env.setdefault, 'defined': env.__contains__ })
3406 eval(self.co, env)
3407 if env.get('_rebase'):
3408 subtpl, rargs = env.pop('_rebase')
3409 rargs['base'] = ''.join(_stdout) #copy stdout
3410 del _stdout[:] # clear stdout
3411 return self._include(env, subtpl, **rargs)
3412 return env
3413
3414 def render(self, *args, **kwargs):
3415 """ Render the template using keyword arguments as local variables. """

Callers 15

renderMethod · 0.95
create_tableFunction · 0.80
read_columns_sqlFunction · 0.80
insert_recordFunction · 0.80
fetch_recordFunction · 0.80
update_recordFunction · 0.80
delete_recordFunction · 0.80
test_read_columns_sqlFunction · 0.80
test_insert_recordFunction · 0.80
test_fetch_recordFunction · 0.80

Calls 6

_includeMethod · 0.95
popMethod · 0.80
evalFunction · 0.50
copyMethod · 0.45
updateMethod · 0.45
getMethod · 0.45

Tested by 9

test_read_columns_sqlFunction · 0.64
test_insert_recordFunction · 0.64
test_fetch_recordFunction · 0.64
test_update_recordFunction · 0.64
test_delete_recordFunction · 0.64