On Sun, Mar 18, 2018 at 10:53 PM, Greg Ewing <greg.ew...@canterbury.ac.nz> wrote:
> > The functions in os are thin wrappers around system calls, > exactly -- and this is a very old legacy from way back. Modern Python users should not have to concern themselves with whether something they want to do is essentially a system call or a higher-level process. Typical users, and certainly newbies, think "I want to do this or that with the filesystem", and it would be really nice if there was one way, and one place to do that. The old os vs shutil was annoying enough, then we got pathlib with very little support in the stlib, which was really annoying. Now we finally have pathlib support in most of the stdlib, so I can really tell people that they can use Paths, rather than strings for paths -- great! But yes, the job is not yet finished, because we still have to go find _some_ functionality in os or shutil Yes, it seems like duplication, but that decision was made when pathlib as added. I do think we should not simply move everything, but rather work out each case -- and I like Nathanial's idea of simplifying / cleaning up the API a bit while we are at it. (please don't have an "unlink"!). -CHB PS: does shutil really still not work with Path objects? aarrgg! PPS: someone made a comment about "having to update every book about python" -- so I"ll repeat: that decision was made when pathlib was added. -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception chris.bar...@noaa.gov
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/