[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 o

[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 ___ _

[issue13779] os.walk: bottom-up

2012-02-23 Thread patrick vrijlandt
patrick vrijlandt added the comment: Good solution. +1 for closing. Patrick -- ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue13779] os.walk: bottom-up

2012-02-22 Thread Zbyszek Szmek
Zbyszek Szmek 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."). -- keywords: +patch Ad

[issue13779] os.walk: bottom-up

2012-01-16 Thread Zbyszek Szmek
Zbyszek Szmek 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) ('/tm

[issue13779] os.walk: bottom-up

2012-01-16 Thread Zbyszek Szmek
Zbyszek Szmek 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 avoided if po

[issue13779] os.walk: bottom-up

2012-01-16 Thread patrick vrijlandt
patrick vrijlandt 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 avoided if possi

[issue13779] os.walk: bottom-up

2012-01-16 Thread Antoine Pitrou
Antoine Pitrou 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 the general

[issue13779] os.walk: bottom-up

2012-01-16 Thread Zbyszek Szmek
Zbyszek Szmek 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 of the simplest

[issue13779] os.walk: bottom-up

2012-01-13 Thread Ross Lagerwall
Changes by Ross Lagerwall : -- nosy: +rosslagerwall ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue13779] os.walk: bottom-up

2012-01-13 Thread patrick vrijlandt
New submission from patrick vrijlandt : 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") >>> os.listdir("g:/a