[Python-Dev] pathlib handling of trailing slash (Issue #21039) (original) (raw)

Antoine Pitrou antoine at python.org
Thu Aug 7 04:30:52 CEST 2014


Le 06/08/2014 22:12, Ben Finney a écrit :

You seem to be saying that ‘pathlib’ is not intended to be helpful for constructing a shell command.

pathlib lets you do operations on paths. It also gives you a string representation of the path that's expected to designate that path when talking to operating system APIs. It doesn't give you the possibility to store other semantic variations ("whether a new directory level must be created"); that's up to you to add those.

(similarly, it doesn't have separate classes to represent "a file", "a directory", "a non-existing file", etc.)

Regards

Antoine.



More information about the Python-Dev mailing list