A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2008-April/078784.html below:

[Python-Dev] A smarter shutil.copytree ?

[Python-Dev] A smarter shutil.copytree ?Guido van Rossum guido at python.org
Mon Apr 21 19:29:38 CEST 2008
On Sun, Apr 20, 2008 at 5:25 PM, Steven Bethard
<steven.bethard at gmail.com> wrote:
>
> On Sun, Apr 20, 2008 at 4:15 PM, Tarek Ziadé <ziade.tarek at gmail.com> wrote:
>  > I have submitted a patch for review here: http://bugs.python.org/issue2663
>  >
>  >  glob-style patterns or a callable (for complex cases) can be provided
>  >  to filter out files or directories.
>
>  I'm not a big fan of the sequence-or-callable argument. Why not just
>  make it a callable argument, and supply a utility function so that you
>  can write something like::
>
>     exclude_func = shutil.excluding_patterns('*.tmp', 'test_dir2')
>     shutil.copytree(src_dir, dst_dir, exclude=exclude_func)
>
>  ?

Agreed. Type testing is fraught with problems.

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4