New submission from Alex <alexjacobso...@gmail.com>:
Maybe I am doing something wrong here but: On Windows 10: > python --version Python 3.7.1 > python >>> from pathlib import Path >>> Path("test.py").resolve() WindowsPath('test.py') >>> Path("test.py").absolute() # this is undocumented in >>> https://docs.python.org/3.7/library/pathlib.html WindowsPath('C:/Users/Name/Desktop/test.py') On Ubuntu 18.04 LTS: $ python3.7 --version Python 3.7.3 $ python3.7 >>> from pathlib import Path >>> Path("test.py").resolve() PosixPath('/home/name/test.py') >>> Path("test.py").absolute() # same as above undocumented PosixPath('/home/name/test.py') Why in Windows does this fail, but not Linux? Why is .absolute() undocumented? I've looked around trying to figure out what the intended behavior is but there is conflicting information. Resolve seems to not work correctly on Windows. Bug? ---------- components: Library (Lib), Windows messages: 341953 nosy: alexjacobson95, eryksun, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Inconsistent/Undocumented behavior with pathlib resolve and absolute on Windows type: behavior versions: Python 3.7 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue36860> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com