weka / easypy

This repository will no longer be maintained. See instead https://github.com/real-easypy/easypy
BSD 3-Clause "New" or "Revised" License
14 stars 0 forks source link

Modify 'times' argument in 'retry' to do what it says in the documentation #195

Closed YuvalEvron closed 5 years ago

YuvalEvron commented 5 years ago

:param times: How many times to retry the function.

While in reality:

if isinstance(times, Timer):
        stopper = times  # a timer is a valid stopper
    elif isinstance(times, Duration):
        stopper = Timer(expiration=times)
    elif isinstance(times, int):
        stopper = ExpiringCounter(times)