[ python-Bugs-966256 ] realpath description misleading

SourceForge.net noreply at sourceforge.net
Thu Jun 3 22:49:28 EDT 2004


Bugs item #966256, was opened at 2004-06-04 12:49
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=966256&group_id=5470

Category: Documentation
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: GaryD (gazzadee)
Assigned to: Nobody/Anonymous (nobody)
Summary: realpath description misleading

Initial Comment:
The current description for os.path.realpath is:

    Return the canonical path of the specified
filename, eliminating any symbolic links encountered in
the path. Availability: Unix. New in version 2.2. 

Firstly, realpath _is_ available under windows also (at
least, it does on my Win XP box).

Secondly, it is not immediately obvious that realpath
will also return an absolute path. An alternative
understanding is that, when supplied with a relative
path, realpath will figure out the absolute path to
determine what components are symbolic links, but
return the relative path with the links removed.

This is quite obvious once you use the function, but if
we're going to have documentation, it may as well be
complete and straightforward.

My suggestion is to change the documentation for
realpath to read:
 "Return the absolute canonical path of the specified
filename, eliminating any symbolic links encountered in
the path."

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

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



More information about the Python-bugs-list mailing list