[issue13779] os.walk: bottom-up

2014-06-15 Thread Mark Lawrence
Mark Lawrence added the comment: The OP is happy with the proposed doc patch so can we have this committed please. -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13779

[issue13779] os.walk: bottom-up

2014-06-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset 351c1422848f by Benjamin Peterson in branch '2.7': clarify when the list of subdirectories is read (closes #13779) http://hg.python.org/cpython/rev/351c1422848f New changeset b10322b5ef0f by Benjamin Peterson in branch '3.4': clarify when the list

[issue13779] os.walk: bottom-up

2012-02-23 Thread patrick vrijlandt
patrick vrijlandt patrick.vrijla...@gmail.com added the comment: Good solution. +1 for closing. Patrick -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13779 ___

[issue13779] os.walk: bottom-up

2012-02-22 Thread Zbyszek Szmek
Zbyszek Szmek zbys...@in.waw.pl added the comment: Maybe this could be closed? I'm attaching a small patch with a documentation clarification. (Adds In either case the list of subdirectories is retrieved before the tuples for the directory and its subdirectories are generated.). --

[issue13779] os.walk: bottom-up

2012-01-16 Thread Zbyszek Szmek
Zbyszek Szmek zbys...@in.waw.pl added the comment: Hi, I think that the documentation is pretty clear ([if topdown=False] ... the directories in dirnames have already been generated by the time dirnames itself is generated). And such behaviour is what one would expect, since it is the result

[issue13779] os.walk: bottom-up

2012-01-16 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: However, the generated (files? and) dirs do not necessarily reflect the current situation as produced by os.listdir. What do you mean exactly? Another process has re-created b in parallel? This race condition is pretty impossible to solve in

[issue13779] os.walk: bottom-up

2012-01-16 Thread patrick vrijlandt
patrick vrijlandt patrick.vrijla...@gmail.com added the comment: The documentation of this function is generally ambiguous, because os.walk is a generator. Thus generate means (1) yielded from a generator and (2) prepared for later use within the generator. To avoid the ambiguity, generate

[issue13779] os.walk: bottom-up

2012-01-16 Thread Zbyszek Szmek
Zbyszek Szmek zbys...@in.waw.pl added the comment: The documentation of this function is generally ambiguous, because os.walk is a generator. Thus generate means (1) yielded from a generator and (2) prepared for later use within the generator. To avoid the ambiguity, generate should be

[issue13779] os.walk: bottom-up

2012-01-16 Thread Zbyszek Szmek
Zbyszek Szmek zbys...@in.waw.pl added the comment: os.makedirs('/tmp/a/b/c') gen = os.walk('/tmp/a') next(gen) ('/tmp/a', ['b'], []) os.makedirs('/tmp/a/b2') next(gen) ('/tmp/a/b', ['c'], []) next(gen) ('/tmp/a/b/c', [], []) gen = os.walk('/tmp/a', onerror=print) next(gen) ('/tmp/a',

[issue13779] os.walk: bottom-up

2012-01-13 Thread patrick vrijlandt
New submission from patrick vrijlandt patrick.vrijla...@gmail.com: PythonWin 3.2 (r32:88445, Feb 20 2011, 21:29:02) [MSC v.1500 32 bit (Intel)] on win32. Portions Copyright 1994-2008 Mark Hammond - see 'Help/About PythonWin' for further copyright information. import os os.makedirs(g:/a/b/c)

[issue13779] os.walk: bottom-up

2012-01-13 Thread Ross Lagerwall
Changes by Ross Lagerwall rosslagerw...@gmail.com: -- nosy: +rosslagerwall ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13779 ___ ___