Skip to content

Clarification on the type needed in a ** preceded parameter #348

Description

@lgalfaso

When making a call to a function setting a parameter with ** it is unclear what is the requirement from the underlying type. Is it required for the type to be dict or any type that implements Mapping is good enough?

Eg, the code below is valid when foo is a dict, is this also valid if foo is a Mapping that is not a dict?

a = dict(**foo)

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