[Python-ideas] OS related file operations (copy, move, delete, rename...) should be placed into one module
Philipp A.
flying-sheep at web.de
Thu Jan 12 04:36:58 EST 2017
Hi George,
While the old “let’s treat strings as paths” modules are split up like you
said, pathlib can do what they do and more:
https://docs.python.org/3/library/pathlib.html
It’s also prettier and easier to use, especially when using autocompletion
(just type “path.is<tab>” and see what you can test the path for)
Best, Philipp
George Fischhof <george at fischhof.hu> schrieb am Do., 12. Jan. 2017 um
10:06 Uhr:
> Hi There,
>
> OS related file operations (copy, move, delete, rename...) should be
> placed into one module...
> As it quite confusing that they are in two moduls (os and shutil).
>
> I have read that one is higher level than other, but actually to use them
> I have to think which function can be found in which module.
>
> It is confuse for beginners, and makes the usage more complex instead of
> make it more simple (as Zen of Python says ;-) )
>
> An alias could good, not to cause incompatibility.
>
> Best regards,
> George
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20170112/35c76076/attachment.html>
More information about the Python-ideas
mailing list