[docs] [issue12970] os.walk() consider some symlinks as dirs instead of non-dirs
Nick Coghlan
report at bugs.python.org
Tue Feb 7 12:54:27 CET 2012
Nick Coghlan <ncoghlan at gmail.com> added the comment:
This behaviour came up recently when implementing os.fwalk() [1]. There are problems with all 3 possible approaches (list as dirs, list as files, don't list at all) when followlinks is False. Since all alternatives are potentially surprising, the current behaviour wins by default (as people will already have written their code to cope with that behaviour and there's no net gain in changing the default, since the desired treatment of such links will vary according to the task at hand).
As a result, I'm converting this to a pure documentation issue - the os.walk() docs should definitely mention this subtlety. The behaviour won't be changing, though.
[1] http://bugs.python.org/issue13734,#msg151077
----------
components: -Library (Lib)
nosy: +ncoghlan
type: behavior -> enhancement
versions: -Python 3.1, Python 3.4
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12970>
_______________________________________
More information about the docs
mailing list