> From: Michael Chermside <mcherm@mcherm.com> > Tim: > > Don't get a swelled head or anything ;-), but your generator-based > version of walk() is beautiful piece of work. I don't mean the code > (although that's clean and readable), but the design. Using a > generator is clearly good, having it return (path,names) tuples is a > nice way to work, and having it return (path,dirnames,filenames) > tuples is inspired. (If you want them lumped together, just add the > lists!) Allowing the consumer to modify control the flow by > modifying dirnames is very nice. And the fact that it's so simple to > code (22 short lines) is a testament to the power of generators. > > I'm +2 on putting this in immediately and deprecating os.path.walk(). Agreed. How about naming it os.walk()? I think it's not OS specific -- all the OS specific stuff is part of os.path. So we only need one implementation. --Guido van Rossum (home page: http://www.python.org/~guido/)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4