A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2008-December/084649.html below:

[Python-Dev] A wart which should have been repaired in 3.0?

[Python-Dev] A wart which should have been repaired in 3.0? [Python-Dev] A wart which should have been repaired in 3.0?Phillip J. Eby pje at telecommunity.com
Tue Dec 30 23:51:48 CET 2008
At 02:32 PM 12/30/2008 -0800, Scott David Daniels wrote:
>More trouble with the "just take the dirname":
>
>     paths = ['/a/b/c', '/a/b/d', '/a/b']
>     os.path.dirname(os.path.commonprefix([
>                         os.path.normpath(p) for p in paths]))
>
>give '/a', not '/a/b'.

...because that's the correct answer.

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4