Nick Coghlan wrote: > It actually wouldn't be a bad place to put a "create a temporary file > and rename it to <name> when closing it" helper class. I'm not sure it would be a good idea to make that behaviour automatic on closing. If anything goes wrong while writing the file, you *don't* want the rename to happen, otherwise it defeats the purpose. It would be okay to have an explicit close_and_rename() method, although there wouldn't be much gained over just calling os.rename() afterwards. What might make more sense is a context manager, e.g. with renaming_file("blarg.txt", "w") as f: ... -- Greg
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4