Related:
This is more a side-effect of how pathlib treats trailing slashes than anything specific to os.path.basename and Path.name. The same sort of issue pops up with e.g. os.path.dirname and Path.parent.
Related:
This is more a side-effect of how pathlib treats trailing slashes than anything specific to os.path.basename and Path.name. The same sort of issue pops up with e.g. os.path.dirname and Path.parent.