Clarify if os.path.basename is equivalent to pathlib.Path.name

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.

2 Likes