[ python-Bugs-1193849 ] os.path.expanduser documentation wrt. empty $HOME

SourceForge.net noreply at sourceforge.net
Mon Feb 20 14:13:01 CET 2006


Bugs item #1193849, was opened at 2005-05-02 15:02
Message generated for change (Settings changed) made by gbrandl
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1193849&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Documentation
Group: Python 2.4
Status: Closed
Resolution: Fixed
Priority: 5
Submitted By: Wummel (calvin)
>Assigned to: Georg Brandl (gbrandl)
Summary: os.path.expanduser documentation wrt. empty $HOME

Initial Comment:
If $HOME is unset, an initial "~" should not be
expanded according to the documentation. But instead it
somehow is expanded, perhaps through the pwd module:

$ env -u HOME python -c "import os.path; print
os.path.expanduser('~/foo')"
/home/calvin/foo

The result should be "~/foo" instead of "/home/calvin/foo".

I suggest adjusting the documentation to state the also
a single "~" is looked up in the pwd module, not only
"~user".

----------------------------------------------------------------------

Comment By: Georg Brandl (birkenfeld)
Date: 2005-08-24 07:28

Message:
Logged In: YES 
user_id=1188172

Okay, committed as Doc/lib/libposixpath.py 1.42, 1.40.2.2.

----------------------------------------------------------------------

Comment By: Raymond Hettinger (rhettinger)
Date: 2005-08-24 05:16

Message:
Logged In: YES 
user_id=80475

Strike the comma before the final "or".

After you post this, put a note on your todo list to check
its appearance in the HTML docs whenever Fred runs an update:
   
    http://www.python.org/dev/doc/devel/


----------------------------------------------------------------------

Comment By: Georg Brandl (birkenfeld)
Date: 2005-06-05 12:29

Message:
Logged In: YES 
user_id=1188172

Attached a patch which fixes the docs. Okay to checkin?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1193849&group_id=5470


More information about the Python-bugs-list mailing list