This bothers me for quite some time. Do you put spaces around join path operator /
of pathlib library?
Consider the following example:
root_dir = Path('root')
sub_dir = root_dir / 'folder1' / 'folder2'
Since the join operator is still an operator, the default convention is to use spaces around it. But the whole idea of this operator is to make your concatenation look like it's a path or URL:
sub_dir = root_dir/'folder1'/'folder2'
IMHO, this way it looks more URLish but still clean and readable.
But the whole idea of this operator is to make your concatenation look like it's a path or URL:
pathlib docs show examples of this feature with spaces around /
like:
p = PurePath('/etc')
p / 'init.d' / 'apache2'
so it seems author intention was to use /
with spaces.