equal
deleted
inserted
replaced
340 |
340 |
341 f = os.fdopen(fd, pycompat.sysstr(mode), bufsize) |
341 f = os.fdopen(fd, pycompat.sysstr(mode), bufsize) |
342 # unfortunately, f.name is '<fdopen>' at this point -- so we store |
342 # unfortunately, f.name is '<fdopen>' at this point -- so we store |
343 # the name on this wrapper. We cannot just assign to f.name, |
343 # the name on this wrapper. We cannot just assign to f.name, |
344 # because that attribute is read-only. |
344 # because that attribute is read-only. |
345 object.__setattr__(self, 'name', name) |
345 object.__setattr__(self, r'name', name) |
346 object.__setattr__(self, '_file', f) |
346 object.__setattr__(self, r'_file', f) |
347 |
347 |
348 def __iter__(self): |
348 def __iter__(self): |
349 return self._file |
349 return self._file |
350 |
350 |
351 def __getattr__(self, name): |
351 def __getattr__(self, name): |