Tal Einat <talei...@gmail.com> added the comment:
I think there is a general flaw with the suggested implementation approach. An infinite loop as currently suggested seems dangerous to me. For example, it could cause a program to stall indefinitely in some unforeseen edge-case. I don't think this would be acceptable for something in the stdlib. On the other hand, limiting this loop to a finite number of attempts would re-introduce the necessity of handling the case where creating the symlink fails. Users of the function would still need to deal with this case (or risk unhandled exceptions). In either case, this wouldn't give users the simplicity and peace of mind that a truly atomic operation would. ISTM that only using actually atomic operations, as provided by the underlying file system and/or OS, would allow us to provide that. Given the above, I must say that I don't see this providing enough utility to justify inclusion in the stdlib, unless a better implementation approach can be found. ---------- nosy: +taleinat _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue36656> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com