bugreport os.path.dirname and os.path.basename

h2m2 h2m2 at mailworks.org
Fri Oct 7 13:34:40 EDT 2016


in the meantime, I am subscribed and confirmed - the bug below as
requested

----- Original message -----
From: h2m2 <h2m2 at mailworks.org>
To: python-list at python.org
Subject: bugreport   os.path.dirname and os.path.basename
Date: Wed, 05 Oct 2016 16:49:17 +0200

bug: 

os.path.dirname('G:\Programmierung\Python\Portugal
Training\Python-for-Algorithms--Data-Structures--and--Life\Algorithm
Analysis and Big O\testFile.ipynb')

result and bug is: 
'G:\\Programmierung\\Python\\Portugal
Training\\Python-for-Algorithms--Data-Structures--and--Life'

if I am not mistaken: correct result  would be
'G:\\Programmierung\\Python\\Portugal
Training\\Python-for-Algorithms--Data-Structures--and--Life\\Algorithm
Analysis and Big O'


analog with basename
'Algorithm Analysis and Big O\testFile.ipynb'    

again, I was expecting 'testFile.ipynb' only


With less complex constructs , the function works well. 
Only that is doubtfull when the names start getting more kind of theses
days ....


Cheers !



More information about the Python-list mailing list