Terry J. Reedy added the comment:

I think the doc should be considered correct and posixpath buggy.  The ntpath 
code checks for the existence of HOME and substitutes before returning the arg 
unchanged, as documented.

    if 'HOME' in os.environ:
        userhome = os.environ['HOME']
    elif 'USERPROFILE' in os.environ:
        userhome = os.environ['USERPROFILE']
    elif not 'HOMEPATH' in os.environ:
        return path
    <create userhome from HOMEDRIVE and HOMEPATH

--
The pwd doc already says " KeyError is raised if the entry asked for cannot be 
found.", so this is not an issue.

----------
assignee: docs@python -> 
components:  -Documentation
nosy: +terry.reedy
stage: needs patch -> test needed

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue20164>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to