[issue31269] bug in islink() and is_symlink()

2017-08-24 Thread Karine
Karine added the comment: Thanks a lot David >Четверг, 24 августа 2017, 18:42 +04:00 от "R. David Murray" >: > > >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()

[issue31269] bug in islink() and is_symlink()

2017-08-24 Thread R. David Murray
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)". [*]

[issue31269] bug in islink() and is_symlink()

2017-08-24 Thread Karine
Karine added the comment: Hi David Thanks for support. one question. I couldn't find a function which will check full path is link or not. Is there any known function> >Четверг, 24 августа 2017, 17:38 +04:00 от "R. David Murray" >: > > >R. David Murray added the comment: > >The docs say, eg:

[issue31269] bug in islink() and is_symlink()

2017-08-24 Thread R. David Murray
R. David Murray added the comment: The docs say, eg: "Return True if the path points to a symbolic link". The path points to a file system object, and it is the object that is being checked, not each component of the path used to get to that object. -- nosy: +r.david.murray resolution

[issue31269] bug in islink() and is_symlink()

2017-08-24 Thread Karine
Changes by Karine : -- title: bug in islink() and is_simlink() -> bug in islink() and is_symlink() ___ Python tracker ___ ___ Python-b