On Thu, Feb 16, 2012 at 11:49 AM, Ben Finney <ben+pyt...@benfinney.id.au> wrote:
> No, I have no objection to that implementation. I'm pointing that out
> only because the nature of the functionality implies I'd expect to find
> it within the ‘os’ module hierarchy.

The (very) rough rule of thumb is that the os module handles
abstracting away cross-platform differences in implementation details,
while the higher level shutil algorithms can be largely platform
independent by using the shared abstractions in the os module layer.
In this case, os.replace() is the cross platform abstraction, while
the atomic file context manager is just a particular use case for that
new feature.

(MvL complained in the tracker issue about a lack of concrete use
cases, but I think fixing race conditions when overwriting bytecode
files in importlib and the existing distutils/packaging use cases
cover that)

Cheers,
Nick.

-- 
Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to