[issue13375] Provide a namedtuple style interface for os.walk values

Nick Coghlan report at bugs.python.org
Wed Nov 9 08:22:39 CET 2011


New submission from Nick Coghlan <ncoghlan at gmail.com>:

The 3-tuple values yielded by os.walk could be made easier to work with in some use cases by offering a namedtuple style interface (similar to what is done with sys.float_info).

for dirinfo in os.walk(base_dir):
    print(dirinfo.path)
    print(dirinfo.subdirs)
    print(dirinfo.files)

----------
messages: 147334
nosy: ncoghlan
priority: normal
severity: normal
status: open
title: Provide a namedtuple style interface for os.walk values

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13375>
_______________________________________


More information about the Python-bugs-list mailing list