Bye Bye Moore

猫マンション建築の野望を胸に零細事業主として資本主義の荒波に漕ぎ出したアラサー男の技術メモ

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