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

Guido van Rossum guido at python.org
Thu Aug 7 17:05:46 CEST 2014


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 <antoine at 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 at 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)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20140807/8c147644/attachment.html>


More information about the Python-Dev mailing list