On Sun, Jan 7, 2018 at 4:51 AM, Albert-Jan Roskam <sjeik_ap...@hotmail.com> wrote: > > On Jan 7, 2018 09:08, Steven D'Aprano <st...@pearwood.info> wrote:
>> realpath() returns the canonical path of the given filename. It doesn't >> try to locate some actual existing file. > > I always thought that os.path.realpath is the Python equivalent of Linux > realpath/readlink (http://man7.org/linux/man-pages/man3/realpath.3.html). And > that, thus, there's only a difference between input and output when the input > is a symlink (and maybe also when it's a hard link - in this case the > function actually also does something in Windows). But then, I don't really > know the meaning of the word "canonical", to tell you the truth (maybe #4 in > http://www.dictionary.com/browse/canonical) My hangup was mostly that I was assuming that an actually existing path to a real file was implied. Apparently that is not the case. So Alan's explanation has cleared that up for me (I think!). I agree with you that the 4th definition you cite: "4. Mathematics. (of an equation, coordinate, etc.) in simplest or standard form." is the most sensible definition in this context with Steve's caveats. -- boB _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor