# load ()

#### load (*file*, *\**, *fix\_imports=True*, *encoding="ASCII"*, *errors="strict"*, *buffers=None*)

Загружает сериализованное представление объекта из открытого файла ***file*** и возвращает указанную в нем иерархию восстановленных объектов.

Это эквивалент  `Unpickler(file).load().`

Версия протокола pickle определяется автоматически, поэтому аргумент протокола не требуется. Байты, идущие вслед за сериализованным представлением объекта, игнорируются.

Аргументы ***file***, ***fix\_imports, encoding, errors, strict*** и ***buffers*** имеют то же значение, что и в конструкторе **Unpickler**.

Изменено в версии 3.8: добавлен аргумент ***buffers***.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://treasuremaster.gitbook.io/python-docs/moduli-standartnoi-biblioteki-1/khranenie-dannykh/pickle/load.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
