def join(self, other):
"""join other normsubpath inplace
Both normpaths must contain at least one normsubpath.
The last normsubpath of self will be joined to the first
normsubpath of other.
"""
other = other.normpath()
if not self.normsubpaths:
raise NormpathException("cannot join to empty path")
if not other.normsubpaths:
raise PathException("cannot join empty path")
self.normsubpaths[-1].join(other.normsubpaths[0])
self.normsubpaths.extend(other.normsubpaths[1:])
评论列表
文章目录