Home / Function/ __reduce__() — requests Function Reference

__reduce__() — requests Function Reference

Architecture documentation for the __reduce__() function in exceptions.py from the requests codebase.

Entity Profile

Dependency Diagram

graph TD
  2b9e85be_370d_81a4_a34d_de6d1d409d5a["__reduce__()"]
  2d14a772_615c_c670_32ea_a875f1f37750["JSONDecodeError"]
  2b9e85be_370d_81a4_a34d_de6d1d409d5a -->|defined in| 2d14a772_615c_c670_32ea_a875f1f37750
  style 2b9e85be_370d_81a4_a34d_de6d1d409d5a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/requests/exceptions.py lines 45–53

    def __reduce__(self):
        """
        The __reduce__ method called when pickling the object must
        be the one from the JSONDecodeError (be it json/simplejson)
        as it expects all the arguments for instantiation, not just
        one like the IOError, and the MRO would by default call the
        __reduce__ method from the IOError due to the inheritance order.
        """
        return CompatJSONDecodeError.__reduce__(self)

Domain

Subdomains

Frequently Asked Questions

What does __reduce__() do?
__reduce__() is a function in the requests codebase, defined in src/requests/exceptions.py.
Where is __reduce__() defined?
__reduce__() is defined in src/requests/exceptions.py at line 45.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free