[Python-checkins] r56019 - in python/trunk: Doc/lib/libtarfile.tex Lib/tarfile.py Lib/test/test_tarfile.py Misc/NEWS

Georg Brandl g.brandl at gmx.net
Mon Jun 18 17:16:47 CEST 2007


lars.gustaebel schrieb:
> Author: lars.gustaebel
> Date: Mon Jun 18 13:42:11 2007
> New Revision: 56019
> 
> Modified:
>    python/trunk/Doc/lib/libtarfile.tex
>    python/trunk/Lib/tarfile.py
>    python/trunk/Lib/test/test_tarfile.py
>    python/trunk/Misc/NEWS
> Log:
> Added exclude keyword argument to the TarFile.add() method.
> 
> 
> Modified: python/trunk/Doc/lib/libtarfile.tex
> ==============================================================================
> --- python/trunk/Doc/lib/libtarfile.tex	(original)
> +++ python/trunk/Doc/lib/libtarfile.tex	Mon Jun 18 13:42:11 2007
> @@ -314,13 +314,16 @@
>      \end{notice}
>  \end{methoddesc}
>  
> -\begin{methoddesc}{add}{name\optional{, arcname\optional{, recursive}}}
> +\begin{methoddesc}{add}{name\optional{, arcname\optional{, recursive\optional{, exclude}}}}
>      Add the file \var{name} to the archive. \var{name} may be any type
>      of file (directory, fifo, symbolic link, etc.).
>      If given, \var{arcname} specifies an alternative name for the file in the
>      archive. Directories are added recursively by default.
> -    This can be avoided by setting \var{recursive} to \constant{False};
> -    the default is \constant{True}.
> +    This can be avoided by setting \var{recursive} to \constant{False}.
> +    If \var{exclude} is given it must be a function that takes one filename
> +    argument and returns a boolean value. Depending on this value the
> +    respective file is either excluded (\constant{True}) or added
> +    (\constant{False}).
>  \end{methoddesc}

This needs a \versionchanged entry for the new parameter.

Georg



More information about the Python-checkins mailing list