Default file classes are different in Python 2 vs 3.
Use the object's own reference.