[issue39090] Document various options for getting the absolute path from pathlib.Path objects
Floris Lambrechts added the comment: I've written an "Absolute paths" section based on the knowledge I found in the various threads. Any review is appreciated. https://github.com/florisla/cpython/tree/pathlib-chapter-absolute-paths With some related documentation changes: https://github.com/florisla/cpython/tree/absolute-path-related-improvements -- nosy: +florisla ___ Python tracker <https://bugs.python.org/issue39090> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue39090] Document various options for getting the absolute path from pathlib.Path objects
Floris Lambrechts added the comment: This is the new chapter: https://github.com/florisla/cpython/commit/c146ad3d086fe9e401284c12fc670ea4f9398f3b -- ___ Python tracker <https://bugs.python.org/issue39090> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue39090] Document various options for getting the absolute path from pathlib.Path objects
Floris Lambrechts added the comment: @ChrisBarker, Could you review the proposed addition to the documentation? https://github.com/florisla/cpython/commit/c146ad3d086fe9e401284c12fc670ea4f9398f3b -- ___ Python tracker <https://bugs.python.org/issue39090> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue39090] Document various options for getting the absolute path from pathlib.Path objects
Floris Lambrechts added the comment: (sorry, didn't see the GitHub comments before... I'll process those first.) -- ___ Python tracker <https://bugs.python.org/issue39090> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue39090] Document various options for getting the absolute path from pathlib.Path objects
Floris Lambrechts added the comment: Based on the feedback received in GitHub here: https://github.com/florisla/cpython/commit/c146ad3d086fe9e401284c12fc670ea4f9398f3b I made a new revision of the 'Absolute paths' chapter here: https://github.com/florisla/cpython/blob/pathlib-chapter-absolute-paths-2/Doc/library/pathlib.rst#absolute-paths Further feedback is welcome. Changes: * Be more 'in your face' about Path.resolve() being the recommended approach. * Add separate section on Windows considerations * Explain difference between Path.resolve() and os.path.isabs() w.r.t. checking for drive. * Refer to 'mapped share' instead of 'mapped network share'. * Explain replacement of substitute drive with final path. * Mention os.path.abspath's upcasing of drive letter in case of a path missing a root. * Mention different handling of junctions versus symlinks w.r.t. relative parts. For brevity, I've kept the wording on substitute drive and handling of junctions very short. For the same reason I did not not include eryksun's (interesting!) info on why mapped and substitute drives are non-canonical. Not mentioning Path.resolve()'s behavior w.r.t. non-existing files since that's documented in resolve() itself. -- ___ Python tracker <https://bugs.python.org/issue39090> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com