Skip to content

Commit

Permalink
Change ambiguous description of backoff_factor (#1436)
Browse files Browse the repository at this point in the history
Change from `^` to `**`. Programmers not familiar with python might assume the ^ is the exponent operator, when in fact it is the bitwise XOR operator. This change will remove the ambiguity.
  • Loading branch information
Mattwmaster58 authored and sethmlarson committed Sep 9, 2018
1 parent a36d7ea commit 1821e73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/urllib3/util/retry.py
Expand Up @@ -115,7 +115,7 @@ class Retry(object):
(most errors are resolved immediately by a second try without a
delay). urllib3 will sleep for::
{backoff factor} * (2 ^ ({number of total retries} - 1))
{backoff factor} * (2 ** ({number of total retries} - 1))
seconds. If the backoff_factor is 0.1, then :func:`.sleep` will sleep
for [0.0s, 0.2s, 0.4s, ...] between retries. It will never be longer
Expand Down

0 comments on commit 1821e73

Please sign in to comment.