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/2003-March/033983.html below:

[Python-Dev] os.path.dirname misleading?

[Python-Dev] os.path.dirname misleading? [Python-Dev] os.path.dirname misleading?Guido van Rossum guido@python.org
Wed, 12 Mar 2003 12:04:38 -0500
> I'm not sure whether to classify this as a bug or a feature request.
> Recently, I got burned by the fact that despite the name, dirname()
> does not return the expected directory portion of a path if you pass
> it a directory, instead it will return the parent directory because
> it uses split.

This is the first time I've ever heard of this confusion.  dirname is
named after the Unix shell function of the same name, which behaves
the same way.

I'm not even sure I understand what you expected -- you expected
dirname("foo") to return "foo" if foo is a directory?  What would be
the point of that?

--Guido van Rossum (home page: http://www.python.org/~guido/)



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