On 7 August 2014 02:55, Antoine Pitrou <anto...@python.org> wrote: > pathlib is generally concerned with filesystem operations written in Python, > not arbitrary third-party tools. Also it is probably easy to append the > trailing slash in your command-line invocation, if so desired.
I had a use case where I wanted to allow a config file to contain "path: foo" to create a file called foo, and "path: foo/" to create a directory. It was a shortcut for specifying an explicit "directory: true" parameter as well. The fact that pathlib stripped the slash made coding this mildly tricky (especially as I wanted to cater for Windows users writing "foo\\"...) It's not a showstopper, but I agree that semantically, being able to distinguish whether an input had a trailing slash is sometimes useful. Paul _______________________________________________ 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