One reason to have it is you might not get a ValueError or etc. until 
you've actually made an HTTP request, which is a little unexpected. We 
also validate the inputs for timeouts.

On 2/3/14, 3:12, Andrey Petrov wrote:
>
> In urllib3/util/retry.py:
>
> > +
> > +        # This is kind of ugly; we get in this situation because max in Python
> > +        # 3 needs to compare integers, and it's probably good to assign integers
> > +        # to totals anyway. Just assigning total to 0 does not work because
> > +        # total=0 has a semantic meaning separate from total=None; it means
> > +        # "never retry anything". We can't set it to sys.maxsize because that
> > +        # ruins the max() checks on totals below. Instead we store the state in
> > +        # a variable.
> > +        self._total_specified = total is not None
> > +        if self._total_specified:
> > +            self.total = self._validate_retry(total, 'total')
> > +        else:
> > +            # If it's None, the bottleneck becomes the specified sub-limits.
> > +            self.total = MAX_SANE_RETRY
> > +
> > +        self.connect = self._validate_retry(connect, 'connect')
>
> Can we remove the type-checking? I'm happy to allow for unexpected 
> behavior with unexpected input. Garbage in, garbage out. :P
>
> —
> Reply to this email directly or view it on GitHub 
> <https://github.com/shazow/urllib3/pull/326/files#r9373292>.
>