[Python-Dev] posixpath module.

Alex Coventry alex_c@MIT.EDU
Fri, 14 Jul 2000 18:42:49 -0400 (EDT)


>   If an exception is expected, it should test that it gets the right
> failure.  This is especially important in a regression test, so that
> failing cases don't silently becoming non-failing cases.

You're right, of course.  I'll get back to them at some point.

> in what context?  "/" on my box contains "..", which is itself.
> There's nothing special about it in the "path algebra," but it may
> be a useful reduction.

For instance:

>>> import posixpath
>>> posixpath.normpath('/..')
'/..'

I would have thought '/' would be a better result to return.  My
impression was that normpath is used to tell whether two paths are
actually the same, and if that's the case, its current behaviour is
going to give false negatives.  On the other hand, the code seems to
explicitly ignore multiple leading /'s, and that will also give some
false mismatches, so I must be confused somewhere...

Alex.