MCPcopy Index your code
hub / github.com/aws/aws-cli / FunctionContainer

Class FunctionContainer

awscli/s3transfer/utils.py:183–199  ·  view source on GitHub ↗

An object that contains a function and any args or kwargs to call it When called the provided function will be called with provided args and kwargs.

Source from the content-addressed store, hash-verified

181
182
183class FunctionContainer:
184 """An object that contains a function and any args or kwargs to call it
185
186 When called the provided function will be called with provided args
187 and kwargs.
188 """
189
190 def __init__(self, func, *args, **kwargs):
191 self._func = func
192 self._args = args
193 self._kwargs = kwargs
194
195 def __repr__(self):
196 return f'Function: {self._func} with args {self._args} and kwargs {self._kwargs}'
197
198 def __call__(self):
199 return self._func(*self._args, **self._kwargs)
200
201
202class CountCallbackInvoker:

Calls

no outgoing calls