[issue18547] os.path.dirname() does not behave as expected for path without /:es

2013-07-24 Thread R. David Murray
R. David Murray added the comment: Oh, it would definitely be a backward compatibility issue. Imagine code that does a dirname and branches like this: d = dirname(somepath) if d: else: Or to give a more concrete example: path = fn if dirname(fn) else os.path.join

[issue18547] os.path.dirname() does not behave as expected for path without /:es

2013-07-24 Thread Jonas Eriksson
New submission from Jonas Eriksson: 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") '.' >>> W