29 Jan
2019
29 Jan
'19
4:30 p.m.
On 1/28/2019 8:40 PM, Jamesie Pic wrote:
0. os.path.join takes *args
Since at least 1 path is required, the signature is join(path, *paths). I presume that this is the Python version of the Unix version of the system call that it wraps.. The hidden argument is os.sep. It is equivalent to os.sep.join((path,)+paths) (though one would not write it this way).
1. str.join takes a list argument,
This premise behind the (repeated) request is a false. str.joins arguments are a string (the joiner) and an *iterable of strings*, which is an abstract subclass of the abstract concept 'iterable'. And only a small fraction of lists are lists of strings and therefore iterables of strings. -- Terry Jan Reedy