Repeat
- hivecore.decorator.repeat(number_of_times: int) List[any]
A decorator that will repeat a function n times.
- Parameters:
number_of_times (int) – Number of times to repeat the function.
- Returns:
A list of results from each execution.
- Return type:
List[Any]
Example
from hivecore.decorator import repeat
@repeat(10)
def print_hello():
print('Hello')
print_hello()