homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients amaury.forgeotdarc, benjamin.peterson, krisys, ncoghlan, pitrou, rhettinger
Date 2011年11月10日.02:45:43
SpamBayes Score 1.0504254e-07
Marked as misclassified No
Message-id <1320893144.76.0.939479990555.issue13375@psf.upfronthosting.co.za>
In-reply-to
Content
Why provide any namedtuple interface in any context? After all, you can just unpack them to individual variables.
The point is that the values produced by os.walk() *aren't* just an arbitrary 3-tuple - they have a definite API for describing a directory: the base path, then lists of relative names for any subdirectories and the relative names for any files. Why not make that explicit in the objects produced instead of leaving it as merely implied?
This idea actually came out of the proposal for providing an itertools-inspired toolset for manipulating the output of os.walk() style iteration (#13229 and https://bitbucket.org/ncoghlan/walkdir/overview).
I'll be adding this feature to walkdir regardless, but it seems to make more sense to offer it as standard behaviour.
History
Date User Action Args
2011年11月10日 02:45:44ncoghlansetrecipients: + ncoghlan, rhettinger, amaury.forgeotdarc, pitrou, benjamin.peterson, krisys
2011年11月10日 02:45:44ncoghlansetmessageid: <1320893144.76.0.939479990555.issue13375@psf.upfronthosting.co.za>
2011年11月10日 02:45:43ncoghlanlinkissue13375 messages
2011年11月10日 02:45:43ncoghlancreate

AltStyle によって変換されたページ (->オリジナル) /