@@ -25,20 +25,17 @@ Such constructors may be factory functions or class instances.
25
25
hence not valid as a constructor), raises :exc: `TypeError `.
26
26
27
27
28
- .. function :: pickle(type, function, constructor =None)
28
+ .. function :: pickle(type, function, constructor_ob =None)
29
29
30
30
Declares that *function * should be used as a "reduction" function for objects
31
31
of type *type *. *function * should return either a string or a tuple
32
- containing two or three elements.
32
+ containing two or three elements. See the :attr: `~pickle.Pickler.dispatch_table `
33
+ for more details on the interface of *function *.
33
34
34
- The optional *constructor * parameter, if provided, is a callable object which
35
- can be used to reconstruct the object when called with the tuple of arguments
36
- returned by *function * at pickling time. A :exc: `TypeError ` is raised if the
37
- *constructor * is not callable.
35
+ The *constructor_ob * parameter is a legacy feature and is now ignored, but if
36
+ passed it must be a callable.
38
37
39
- See the :mod: `pickle ` module for more details on the interface
40
- expected of *function * and *constructor *. Note that the
41
- :attr: `~pickle.Pickler.dispatch_table ` attribute of a pickler
38
+ Note that the :attr: `~pickle.Pickler.dispatch_table ` attribute of a pickler
42
39
object or subclass of :class: `pickle.Pickler ` can also be used for
43
40
declaring reduction functions.
44
41
0 commit comments