[Python-ideas] Updated PEP 428 (pathlib)

Antoine Pitrou solipsis at pitrou.net
Tue Mar 5 08:23:50 CET 2013


On Tue, 05 Mar 2013 00:33:48 +0100
Jan Kaliszewski <zuo at chopin.edu.pl> wrote:
> Hello,
> 
> 1. Ad:
>      >>> PurePosixPath('/usr/bin/python').relative('/etc')
>      Traceback (most recent call last):
>        ...
>      ValueError: ...
> 
> Shouldn't this particular operation return 
> "PurePosixPath('/etc/../usr/bin/python')"?

Think what happens if /etc is a symlink to /var/etc.
(not very likely to happen for /etc, but likely to happen in the
general case)

Regards

Antoine.





More information about the Python-ideas mailing list