[docs] Doc bug : os.readlink(path)

Bernard Lang Bernard.Lang at datcha.net
Sat Apr 20 10:12:03 CEST 2013


Hi,

I think there is a bug in the documentation regarding     os.readlink(path)
on page
http://docs.python.org/2/library/os.html

The current description is :


Return a string representing the path to which the symbolic link points. The result may be either an absolute or relative pathname; if it is relative, it may be converted to an absolute pathname using os.path.join(os.path.dirname(path), result).
Changed in version 2.6: If the path is a Unicode object the result will also be a Unicode object.
Availability: Unix.


This did not make sense to me since os.path.dirname(path) is an
absolute path name iff path itself is one.

I think the correct description is :


Return a string representing the path to which the symbolic link points. This result may be either an absolute or relative pathname; if it is relative, it is relative to the directory os.path.dirname(path), which may not be the current working directory os.getcwd(); it may be converted to a path usable from the current working directory using os.path.join(os.path.dirname(path), os.readlink(path)). This may be an absolute or relative pathname depending on whether path is.
Changed in version 2.6: If the path is a Unicode object the result will also be a Unicode object.
Availability: Unix.


I am not subscribed to this list. Can you please send any comment or
reply directly to me.

Bien cordialement

Bernard Lang


PS  I have been wondering why you write 'Return' rather than 'Returns'
at the beginning of the description.  I am not sure how that is to be
understood grammatically (imperative ?).

-- 
SVP  Ne plus m'écrire à Bernard.Lang at inria.fr mais à l'adresse ci-dessous

Please  No longer write to Bernard.Lang at inria.fr but to the address below

  Bernard.Lang at datcha.net       ,_  /\o    \o/    gsm  +33 6 6206 1693
  http://www.datcha.net/       ^^^^^^^^^^^^^^^^^  tel  +33 1 3056 1693
        Je n'exprime que mon opinion - I express only my opinion
                 CAGED BEHIND WINDOWS or FREE WITH LINUX


More information about the docs mailing list