ENH: return NotImplemented
rather than raise TypeError in Period arithmetic.
#4731
Labels
Error Reporting
Incorrect or improved errors from pandas
Numeric Operations
Arithmetic, Comparison, and Logical operations
Period
Period data type
Milestone
Right now, some of the error messages for in pandas/tseries/period.py are not so great:
And in the case above, should really return
NotImplemented
instead (so that they end up with an error message like):Side note - that's only appropriate these are only used as magic methods (so that the Python interpreter converts them into the TypeError shown above...).
The text was updated successfully, but these errors were encountered: