Hm. I personally consider a trailing slash significant. It feels semantically different (and in some cases it is) so I don't think it should be normalized. The behavior of os.path.split() here feels right.
On Wed, Aug 6, 2014 at 7:30 PM, Antoine Pitrou <anto...@python.org> wrote: > > 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. > > > > _______________________________________________ > Python-Dev mailing list > Python-Dev@python.org > https://mail.python.org/mailman/listinfo/python-dev > Unsubscribe: https://mail.python.org/mailman/options/python-dev/ > guido%40python.org > -- --Guido van Rossum (python.org/~guido)
_______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com