@classmethod
def args_from_string(cls, s):
    """Extract init-arguments from string representation of range."""
    pat = cls.range_pattern
    result = ()
    if pat.match(s):
        if bool(pat.LB) != bool(pat.UB):
            raise ValueError('Need both bounds or none')
        btype = pat.LB + pat.UB if pat.LB and pat.UB else None
        lower = cls.bound_from_string(pat.lower.strip())
        upper = cls.bound_from_string(pat.upper.strip())
        result = lower, upper, btype
    return result
