managend pickhardt_pay verbosity with two optional arguments #17 #21
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
currently statistical summaries are printed in
pickhardt_pay
in each round of payment attempts and in the end.I added two flags to
pickhardt_pay
method as optional arguments:summary
(default:False
) for the final statistics.round_verbosity
(default:False
) for the statistics on the payment attempts in each loop.Statistics for each loop have their own method,
_evaluate_attempts
, where I added the optional argument as well (default:False
)._evaluate_attempts
will receive the optional argument frompickhardt_pay
.My initial thought was to make the whole call of
_evaluate_attempts
dependent on the verbosity choice in thepickhardt_pay
call. However, this would not work, as thepickhardt_pay
call needs to receive the return values from_evaluate_attempts
for its final summary.All statistics are printed to console.