diff options
-rw-r--r-- | Doc/lib/libcopy.tex | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/Doc/lib/libcopy.tex b/Doc/lib/libcopy.tex index 14adbb9..ef42682 100644 --- a/Doc/lib/libcopy.tex +++ b/Doc/lib/libcopy.tex @@ -1,14 +1,12 @@ \section{\module{copy} --- - Shallow and deep copy operations.} + Shallow and deep copy operations} \declaremodule{standard}{copy} \modulesynopsis{Shallow and deep copy operations.} -\withsubitem{(in module copy)}{% - \ttindex{copy}% - \ttindex{deepcopy}} This module provides generic (shallow and deep) copying operations. +\withsubitem{(in copy)}{\ttindex{copy()}\ttindex{deepcopy()}} Interface summary: @@ -77,13 +75,11 @@ Classes can use the same interfaces to control copying that they use to control pickling: they can define methods called \method{__getinitargs__()}, \method{__getstate__()} and \method{__setstate__()}. See the description of module -\module{pickle}\refstmodindex{pickle} for information on these +\refmodule{pickle}\refstmodindex{pickle} for information on these methods. The \module{copy} module does not use the \module{copy_reg} registration module. -\withsubitem{(copy protocol)}{% - \ttindex{__getinitargs__()}% - \ttindex{__getstate__()}% - \ttindex{__setstate__()}} +\withsubitem{(copy protocol)}{\ttindex{__getinitargs__()} + \ttindex{__getstate__()}\ttindex{__setstate__()}} In order for a class to define its own copy implementation, it can define special methods \method{__copy__()} and @@ -94,9 +90,7 @@ one argument, the memo dictionary. If the \method{__deepcopy__()} implementation needs to make a deep copy of a component, it should call the \function{deepcopy()} function with the component as first argument and the memo dictionary as second argument. -\withsubitem{(copy protocol)}{% - \ttindex{__copy__()}% - \ttindex{__deepcopy__()}} +\withsubitem{(copy protocol)}{\ttindex{__copy__()}\ttindex{__deepcopy__()}} \begin{seealso} \seemodule{pickle}{Discussion of the special disciplines used to |