I think a better idea would be check the parameter in the init.
On Oct 4, 2013 5:09 PM, "Phillip Cloud" <notifications@github.com> wrote:

> In pandas/tseries/offsets.py:
>
> > +
> > +            return self.get_year_end(other + relativedelta(years=n))
> > +        else:
> > +            n = -n
> > +            year_end = self.get_year_end(other)
> > +            if other > year_end:
> > +                other = year_end
> > +                n -= 1
> > +            elif other < year_end:
> > +                other = self.get_year_end(other + relativedelta(years=-1))
> > +                n -= 1
> > +
> > +            return self.get_year_end(other + relativedelta(years=-n))
> > +
> > +    def get_rule_code_suffix(self):
> > +        suffix = '%s%s' % (_month_dict[self.startingMonth], _weekday_dict[self.weekday])
>
> will this ever throw a keyerror? if it does is the message informative? i
> would guess not .... so if necessary, you should catch a give a more
> informative keyerorr
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/pydata/pandas/pull/5004/files#r6779340>
> .
>