Serhiy Storchaka added the comment:

> I don't really understand your algorithm. Why do you need a stack?

Before resolving the symlink we mark the path as unresolved symlink for 
detecting infinite symlink loops. Before resolving the symlink we mark the path 
as resolved symlink (and cache the resolved value for speed) for allowing 
finite symlink recursion.

Here is a test which pathlib fails.

----------
Added file: http://bugs.python.org/file28720/pathlib_resolve_test.py

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

Reply via email to