return the common part shared with the other path
or None if there is no common part.
def common(self, other):
origin: PathBase
where:
function source:
def common(self, other):
""" return the common part shared with the other path
or None if there is no common part.
"""
last = None
for x, y in zip(self.parts(), other.parts()):
if x != y:
return last
last = x
return last
called in /home/johnny/projects/merlinux/py/dist/py/test/terminal/terminal.py
called in /home/johnny/projects/merlinux/py/dist/py/test/terminal/terminal.py
called in /home/johnny/projects/merlinux/py/dist/py/test/terminal/terminal.py
called in /home/johnny/projects/merlinux/py/dist/py/test/terminal/terminal.py
called in /home/johnny/projects/merlinux/py/dist/py/test/terminal/terminal.py
called in /home/johnny/projects/merlinux/py/dist/py/path/testing/common.py
called in /home/johnny/projects/merlinux/py/dist/py/path/testing/common.py
called in /home/johnny/projects/merlinux/py/dist/py/test/terminal/terminal.py
called in /home/johnny/projects/merlinux/py/dist/py/path/local/posix.py
called in /home/johnny/projects/merlinux/py/dist/py/path/local/testing/test_posix.py
called in /home/johnny/projects/merlinux/py/dist/py/test/terminal/terminal.py
traceback path.local.common.10
called in /home/johnny/projects/merlinux/py/dist/py/test/terminal/terminal.py
traceback path.local.common.11
called in /home/johnny/projects/merlinux/py/dist/py/test/terminal/terminal.py
traceback path.local.common.12
called in /home/johnny/projects/merlinux/py/dist/py/path/local/posix.py
traceback path.local.common.13
called in /home/johnny/projects/merlinux/py/dist/py/path/local/testing/test_posix.py
traceback path.local.common.14
called in /home/johnny/projects/merlinux/py/dist/py/test/terminal/terminal.py
traceback path.local.common.15
called in /home/johnny/projects/merlinux/py/dist/py/test/terminal/terminal.py
traceback path.local.common.16
called in /home/johnny/projects/merlinux/py/dist/py/test/terminal/terminal.py
traceback path.local.common.17
called in /home/johnny/projects/merlinux/py/dist/py/test/terminal/terminal.py
traceback path.local.common.18
called in /home/johnny/projects/merlinux/py/dist/py/path/local/testing/test_posix.py
traceback path.local.common.19
called in /home/johnny/projects/merlinux/py/dist/py/test/terminal/terminal.py