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 pitrou
Recipients eli.bendersky, eric.araujo, giampaolo.rodola, ncoghlan, pitrou, ubershmekel
Date 2012-02-09.00:10:51
SpamBayes Score 4.0956127e-13
Marked as misclassified No
Message-id <1328746083.3366.10.camel@localhost.localdomain>
In-reply-to <1328745470.26.0.684848904942.issue13968@psf.upfronthosting.co.za>
Content
> However, along with that itertools inspired iterator pipeline based
> design, I've also inherited Raymond's preference that particular *use
> cases* start life as recipes in the documentation.

I think it's important to remember where we are coming from. Many people
complain that using os.walk is too cumbersome. Proposing another
cumbersome solution doesn't really help.

So I'm not against walkdir *per se*, but I'm -1 on the idea that walkdir
can eliminate the need for practical functions that anybody can use
*easily*.

> >>> print '\n'.join(sorted(globtree('*.rst', '*.py')))
> ./conf.py
> ./index.rst
> ./py3k_binary_protocols.rst
> ./venv_bootstrap.rst

I think it's rather nice, but it should be available as a stdlib
function rather than a "recipe" in the documentation.

Recipes are really overrated: they aren't tested, they aren't
maintained, they aren't part of a module's docstrings or
(pydoc-generated) contents, it's not obvious what kind of quality you
can expect from them (do they handle all cases correctly), it's not
obvious which Python versions they support. Raymond may like the idea,
but that doesn't make it a "good practice" Python should follow for its
batteries.

> On a somewhat related note, I'd also like to see us start
> concentrating higher level shell utilities in the shutil namespace so
> users don't have to check multiple locations for shell-related
> functionality quite so often (that is, I'd prefer shutil.globtree over
> glob.rglob).

Well, if glob() already lived in shutil, this decision would be a
no-brainer :) Having glob() in the glob module and globtree() in the
shutil module, though, looks a bit weird.
(I agree having a separate module for glob isn't ideal)
History
Date User Action Args
2012-02-09 00:10:52pitrousetrecipients: + pitrou, ncoghlan, giampaolo.rodola, eric.araujo, eli.bendersky, ubershmekel
2012-02-09 00:10:51pitroulinkissue13968 messages
2012-02-09 00:10:51pitroucreate