Issue 9648: 2to3 doesn't convert "file" usage to an "open" equivalent (original) (raw)
Issue9648
Created on 2010-08-20 01:59 by brian.curtin, last changed 2022-04-11 14:57 by admin. This issue is now closed.
Messages (1) | ||
---|---|---|
msg114417 - (view) | Author: Brian Curtin (brian.curtin) * ![]() |
Date: 2010-08-20 01:59 |
""" with file("sample.py", "r") as f: pass """ The above code comes out of 2to3 with no modifications suggested. "file" is gone in 3.x and could be substituted with "open" usage in most cases. We would also have to handle or otherwise notify the user about code like "isinstance(x, file)". |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:57:05 | admin | set | github: 53857 |
2010-08-21 03:11:35 | benjamin.peterson | set | status: open -> closedresolution: duplicatesuperseder: 2to3 does not convert __builtins__.file |
2010-08-20 01:59:35 | brian.curtin | create |