After I tried os.path.normpath(), it is clear that the function doesn't return the trailing '/', if the path is a directory. But this fact is not documented. Should this be documented in future release of python.
Also, I found the documentation of some functions in os.path are not clear. I have to try them in order to understand them for corner cases. I'm wondering if I can join the people who maintain the document to help improve it. -- http://mail.python.org/mailman/listinfo/python-list