R. David Murray added the comment:

I would phrase that as "check if any of the components of the path are links", 
at which point one "obvious"[*] answer is "any(x.is_symlink() for x in 
[*mypath.parents, mypath])".  If the path is absolute, you could use "not 
(mypath.resolve() == mypath)".

[*] I put that in quotes because it is only obvious once you have a non-trivial 
amount of experience with programming in Python.

----------

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

Reply via email to