by css · 6y ago · 0 comments
new_poll_rate = \
min(
max(
1 / messages_per_second,
constants.FASTEST_POLL_RATE
),
constants.SLOWEST_POLL_RATE
)
I agree with the sentiment, I had to re-read this several times to make sure I got it right.