Message264285
I am suggesting that os.walk and os.fwalk will yield a namedtuple instead of the regular tuple they currently yield.
The use case for this change can be seen in the next example:
def walk_wrapper(walk_it):
for dir_entry in walk_it:
if dir_entry[0] == "aaa":
yield dir_entry
Because walk_it can be either os.walk or os.fwalk I need to access dir_entry via index.
My change will allow me to change this function to:
def walk_wrapper(walk_it):
for dir_entry in walk_it:
if dir_entry.dirpath == "aaa":
yield dir_entry
Witch is more clear and readable. |
|
Date |
User |
Action |
Args |
2016-04-26 13:45:06 | palaviv | set | recipients:
+ palaviv, loewis |
2016-04-26 13:45:06 | palaviv | set | messageid: <1461678306.82.0.694875654943.issue26860@psf.upfronthosting.co.za> |
2016-04-26 13:45:06 | palaviv | link | issue26860 messages |
2016-04-26 13:45:06 | palaviv | create | |
|