Skip to content

Add apply_defaults method to BoundArguments (from Python 3.5) #28

@BlckKnght

Description

@BlckKnght

Python 3.5 extended the inspect.BoundArguments class, adding a new apply_defaults method which updates arguments with default values for any parameters that haven't been bound yet.

See Python issue 24190 for the discussion and the patch implementing the change (including doc changes and tests). I've not tried it myself, but I suspect that patch should almost work for this backported version of the code as well. The additions to the main library code should be fine. The test code however might need to be simplified a tiny bit to avoid using features that don't exist in older Python versions (e.g. annotations).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions