Bye Bye Moore

PoCソルジャーな零細事業主が作業メモを残すブログ

PurePath

This module offers classes representing filesystem paths with semantics appropriate for different operating systems. Path classes are divided between pure paths, which provide purely computational operations without I/O, and concrete paths, which inherit from pure paths but also provide I/O operations.

という事で、今回のPurePathはPathをつくるだけの関数のようです。

PurePath("/hoge","bar/buzz")
# PurePosixPath('/hoge/bar/buzz')

賢いので、"."であれば無視してくれます

PurePath("hoge",".","bar/buzz")
# PurePosixPath('hoge/bar/buzz')

11.1. pathlib — Object-oriented filesystem paths — Python 3.6.4 documentation