This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Jonas.Eriksson
Recipients Jonas.Eriksson
Date 2013-07-24.16:31:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1374683519.45.0.070204283565.issue18547@psf.upfronthosting.co.za>
In-reply-to
Content
Only tested on marked python versions. Checked the code in hg (a5681f50bae2) and did not see anything related to this in the current development version.

Essentially, what I see is this:
>>> os.path.dirname("asdf")
''
>>> os.path.dirname("./asdf")
'.'
>>> 

What I expect is the same output as from the unix command dirname:
$ dirname asdf
.
$ dirname ./asdf
.
$ 

The change is quite straight forwards, Lib/posixpath.py needs something like if head = "": head = ".", and Lib/ntpath.py something similar.

Now, this bug is a tricky one since it alters the behavior of dirname. However, I cannot see any case where "" would be useful and have seen at least one bug because of this behaviour because the return value "" is treated like an error. So I gracefully hand over the final decision to you :)
History
Date User Action Args
2013-07-24 16:31:59Jonas.Erikssonsetrecipients: + Jonas.Eriksson
2013-07-24 16:31:59Jonas.Erikssonsetmessageid: <1374683519.45.0.070204283565.issue18547@psf.upfronthosting.co.za>
2013-07-24 16:31:59Jonas.Erikssonlinkissue18547 messages
2013-07-24 16:31:59Jonas.Erikssoncreate