Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4d5d4e2

Browse files
committed
#13426: merge with 3.2.
2 parents adc417c + e62aad3 commit 4d5d4e2

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

Doc/library/pickle.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ The :mod:`pickle` module defines three exceptions:
237237

238238
.. exception:: UnpicklingError
239239

240-
Error raised when there a problem unpickling an object, such as a data
240+
Error raised when there is a problem unpickling an object, such as a data
241241
corruption or a security violation. It inherits :exc:`PickleError`.
242242

243243
Note that other exceptions may also be raised during unpickling, including
@@ -324,11 +324,11 @@ The :mod:`pickle` module exports two classes, :class:`Pickler` and
324324

325325
.. method:: persistent_load(pid)
326326

327-
Raise an :exc:`UnpickingError` by default.
327+
Raise an :exc:`UnpicklingError` by default.
328328

329329
If defined, :meth:`persistent_load` should return the object specified by
330330
the persistent ID *pid*. If an invalid persistent ID is encountered, an
331-
:exc:`UnpickingError` should be raised.
331+
:exc:`UnpicklingError` should be raised.
332332

333333
See :ref:`pickle-persistent` for details and examples of uses.
334334

@@ -377,7 +377,7 @@ raised in this case. You can carefully raise this limit with
377377

378378
Note that functions (built-in and user-defined) are pickled by "fully qualified"
379379
name reference, not by value. This means that only the function name is
380-
pickled, along with the name of module the function is defined in. Neither the
380+
pickled, along with the name of the module the function is defined in. Neither the
381381
function's code, nor any of its function attributes are pickled. Thus the
382382
defining module must be importable in the unpickling environment, and the module
383383
must contain the named object, otherwise an exception will be raised. [#]_
@@ -668,7 +668,7 @@ inoffensive, it is not difficult to imagine one that could damage your system.
668668
For this reason, you may want to control what gets unpickled by customizing
669669
:meth:`Unpickler.find_class`. Unlike its name suggests, :meth:`find_class` is
670670
called whenever a global (i.e., a class or a function) is requested. Thus it is
671-
possible to either forbid completely globals or restrict them to a safe subset.
671+
possible to either completely forbid globals or restrict them to a safe subset.
672672

673673
Here is an example of an unpickler allowing only few safe classes from the
674674
:mod:`builtins` module to be loaded::

0 commit comments

Comments
 (0)