Terry J. Reedy added the comment: FWIW, some history: The $HOME lookup was in Guido's original 1998-12-22 patch: if not file: file = os.path.join(os.environ['HOME'], ".netrc") The lookup was wrapped in try-except 4 years later to give a 'consistent error message'.
Module ntpath dates back to 1994. Expanduser only used HOMEDRIVE and HOMEPATH. Guido added support for HOME in 1997. Support for USERPROFILE was added a decade later. Since the module is NOT marked 'Unix-only', I think it a bug to not use os.path.expanduser. Larry, Ned, do either of you have an opinion on whether the change should be made in current versions or only 3.7? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28334> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com