>
> This is all on Windows.
> I was surprised to discover that
> os.path.split(".")
> returns
> ('', '.')
> rather than
> ('.', '')
> i.e. the dot is treated as (part of) a file name rather than a directory
> name.
> After all, "." is not a valid file name (though it could be part of a
> file name) but IS a valid directory name.
> Is there a good reason for this?
>
https://docs.python.org/3/library/os.path.html#os.path.split says:
Split the pathname path into a pair, (head, tail) ...
I see your point, but maybe because some find it easier to work with a
function which returns the same signature regardless of the input?
FWIW, same results on Linux.
--
https://mail.python.org/mailman3//lists/python-list.python.org