I was debating doing that. I have done that in some other parts of this
refactoring.


On Sun, Oct 27, 2013 at 6:35 PM, Jeff Tratner <notifications@github.com>wrote:

> In pandas/tseries/offsets.py:
>
> > @@ -31,6 +31,16 @@ class ApplyTypeError(TypeError):
> >  class CacheableOffset(object):
> >      _cacheable = True
> >
> > +class _NonCythonPeriod(object):
>
> Okay, better way to do this would be to move the methods on to DateOffset,
> so you always call from there and then allow DateOffset to call down to
> tslib instead.
>
> E.g.: could have:
>
> def get_period_ordinal(self, dt):
>     return tslib.period_ordinal(dt.year, dt.month, dt.day,
>                                               dt.hour, dt.minute, dt.second, dt.microsecond, 0,
>                                               self.base)
>
> And then offsets where that won't work should override it (or whichever
> way is simplest to switch between that and NotImplemented).
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/pydata/pandas/pull/5148/files#r7238205>
> .
>