[Python-Dev] os.path.commonprefix

Michael Hudson mwh@python.net
07 Dec 2002 16:20:25 +0000


Armin Rigo <arigo@tunes.org> writes:

> >>> commonprefix(['/home/users/arigo', '/home/users/alal'])
> '/home/users/a'
> 
> What is the use for such a thing ??

I seem to recall a discussion which decided that there is no use for
such a thing, but that changing it might break code for people who
found one.  ICBW.

> I suggest that a more descriptive comment be added in the documentation.

No argument from here.

Cheers,
M.

-- 
  We did requirements and task analysis, iterative design, and user
  testing. You'd almost think programming languages were an interface
  between people and computers.                    -- Steven Pemberton
          (one of the designers of Python's direct ancestor ABC)