Jason R. Coombs <jar...@jaraco.com> added the comment:

Thanks Garen for the detailed analysis and writeup. The short answer to your 
question is "supported by the Python runtime". Allow me to provide a bit of 
history.

Symlink awareness under Windows was added to Python in Python 3.2, so the 
behavior you see in Python 2.7 is somewhat historical - in particular, islink 
was implemented to always return False. In hindsight, this decision was 
probably a poor one, because it doesn't allow for forward compatibility.

Unfortunately, due to the compatibility rules of Python versions, this cannot 
change. The semantic meaning of ntpath.islink (and thus os.path.islink on 
Windows) cannot change.

The suggestion to update the documentation to reflect this behavior is  a good 
one. I will extend the Python 3.1 and earlier docs to clarify this detail.

One suggestion for the client: to accurately determine if the Python runtime 
supports symlinks, check hasattr(os, 'symlink'), whereafter you'll know if the 
runtime supports symlinks and whether os.link will return anything other than 
False.

----------
assignee:  -> jason.coombs

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

Reply via email to