A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2005-September/056518.html below:

[Python-Dev] os.path.diff(path1, path2)

[Python-Dev] os.path.diff(path1, path2)Greg Ewing greg.ewing at canterbury.ac.nz
Tue Sep 20 04:30:43 CEST 2005
Matthias Andreas Benkard wrote:

> /home -> usr/home
> /usr
> /usr/home
> 
> What does os.path.diff("/home/", "/usr/") yield? "../usr/", I would
> presume? But that's obviously wrong:

IMO, the relpath method should just work textually on
the pathnames. It's up to the user to ensure it makes
sense to do so, e.g. by resolving symlinks beforehand
if necessary.

The alternative would be for relpath to do this itself,
but that would make it very unusual compared to the
other path-munging functions, none of which touch the file
system.

-- 
Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg.ewing at canterbury.ac.nz	   +--------------------------------------+
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4