pydata/pandas — pull request #4613 by jtratner (2013-08-20 03:15:21+00:00)
Title: CLN: Refactor series datetime arithmetic

This is a prelude to the larger refactoring of arithmetic into core/ops,
etc. It doesn't change any external behavior (and I'm relatively confident that
the test suite covers all the branches).

The complexity of the time arithmetic code was making it hard to tweak,
so I decided to change it up. It's not that complicated, but wanted to
run it by you all in an easy-to-read diff before I change its files.

Specifically it:
1. Breaks up the long `_arith_method` into smaller chunks of functions
2. Consolidates the previously repeated type conversions into one.
3. Separates validations from type conversions, which makes the function
easier to follow and write.
4. Changes all obscure character codes to clear ones.
5. Removes the unnecessary `set()` calls in convert_to_array.