This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author r.david.murray
Recipients karaV, r.david.murray
Date 2017-08-24.14:42:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1503585743.46.0.51805035877.issue31269@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2017-08-24 14:42:23r.david.murraysetrecipients: + r.david.murray, karaV
2017-08-24 14:42:23r.david.murraysetmessageid: <1503585743.46.0.51805035877.issue31269@psf.upfronthosting.co.za>
2017-08-24 14:42:23r.david.murraylinkissue31269 messages
2017-08-24 14:42:23r.david.murraycreate