[Python-ideas] Adding '**' recursive search to glob.glob (original) (raw)
Antoine Pitrou solipsis at pitrou.net
Mon Jan 14 17:21:20 CET 2013
- Previous message: [Python-ideas] Adding '**' recursive search to glob.glob
- Next message: [Python-ideas] Adding '**' recursive search to glob.glob
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Le Mon, 14 Jan 2013 18:14:55 +0200, Serhiy Storchaka <storchaka at gmail.com> a écrit :
> One obvious downside is that if used carelessly, it can make > globbing pretty slow. So I'd propose that it be added as an > optional extension enabled using a flag argument (glob(pat, > allowrecursive=True)) which is false by default. That would also > mean that backward compatibility should not be an issue. Indeed. That's why I added the "recursive" parameter and disable this by default.
Using APIs carelessly is the user's problem, not ours. It should be sufficient to add a small warning in the docs, as I did in pathlib:
https://pathlib.readthedocs.org/en/latest/#pathlib.Path.glob
Regards
Antoine.
- Previous message: [Python-ideas] Adding '**' recursive search to glob.glob
- Next message: [Python-ideas] Adding '**' recursive search to glob.glob
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]