New submission from wenjun.o <wouy...@outlook.com>:
The statement "os.path.realpath('C:\\Users\\')" returns different results between 3.6.6 and 3.6.7 (and between 3.7.0 and 3.7.1) on Windows. With python 3.6.6 and 3.7.0 I got 'C:\\Users'. With python 3.6.7 and 3.7.1 I got 'C:\\Users\\'. Note the extra trailing backslash with python 3.6.7 and 3.7.1. On Linux the behavior is consistent where the trailing slash in the input will be remove from the output: os.path.realpath('/home/') --> '/home'. I think we should keep the behavior of removing trailing backslash on Windows. Thanks. ---------- components: Library (Lib) messages: 329574 nosy: wouyang priority: normal severity: normal status: open title: os.path.realpath preserves the trailing backslash on Windows in python 3.6.7 and python 3.7.1 type: behavior versions: Python 3.6 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue35205> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com