On Sun, Apr 20, 2008 at 5:25 PM, Steven Bethard
<[EMAIL PROTECTED]> wrote:
>
> On Sun, Apr 20, 2008 at 4:15 PM, Tarek Ziadé <[EMAIL PROTECTED]> 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/)
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to