Fixed #21321 -- Made File.__iter__ compatible with python3.