This seems to be overlapping quite a lot with the recent discussion on object-oriented paths (<a href="http://mail.python.org/pipermail/python-ideas/2012-October/016338.html">http://mail.python.org/pipermail/python-ideas/2012-October/016338.html</a>) and this question of how paths are represented on different systems was discussed quite extensively.  I'm not sure where the thread left off, but if PEP 428 is still going ahead then maybe this is something that should be brought into it.<br>

<br>David<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Nov 7, 2012 at 7:15 AM, Greg Ewing <span dir="ltr"><<a href="mailto:greg.ewing@canterbury.ac.nz" target="_blank">greg.ewing@canterbury.ac.nz</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">Bruce Leban wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
If you change the semantics so that it either (1) it always always includes a trailing / or (2) it includes a trailing slash if the two paths have it in common, then you don't have the weirdness that in this case it returns a slash and in others it doesn't. I am slightly inclined to (1) at this point.<br>


</blockquote>
<br></div>
But then the common prefix of "/a/b" and "/a/c" would be "/a/",<br>
which would be very unexpected -- usually the dirname of a path is<br>
not considered to include a trailing slash.<br>
<br>
The special treatment of the root directory is no weirder than it<br>
is anywhere else. It's already special, since in unix it's the<br>
only case where a trailing slash is semantically significant.<br>
(To the kernel, at least -- a few command line utilities break this<br>
rule, but they're screwy.)<span class="HOEnZb"><font color="#888888"><br>
<br>
-- <br>
Greg</font></span><div class="HOEnZb"><div class="h5"><br>
______________________________<u></u>_________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org" target="_blank">Python-ideas@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/python-ideas" target="_blank">http://mail.python.org/<u></u>mailman/listinfo/python-ideas</a><br>
</div></div></blockquote></div><br></div>