> Steven D'Aprano wrote: > I would call that a bug in commonprefix. The documentation on the website correctly describes this behavior (http://docs.python.org/library/os.path.html) while the docstring does not. Someone tried to make the behavior more sane some time ago (http://bugs.python.org/issue400788) but this was reverted since it was backwards incompatible and the documentation correctly described the behavior. There is currently an open issue (http://bugs.python.org/issue10395) to add a function that does what commonprefix should have done to start with. Once this function is present I see no need for an is{parent|child} function. Brendan