wesm/pandas — comment on commit b4ca18bd605e15f3fc43934f52e2752a1231a3dd
File: pandas/core/common.py line 822
By takluyver:

I might be inclined to catch `AttributeError` here, rather than checking that sys.stdin is not None. It's possible that other code will replace stdin with another object which doesn't have an encoding attribute.