Skip to content

Extract keyword #140518

@BestGiter

Description

@BestGiter

Feature or enhancement

Proposal:

extract {"name": "bob", "age": 5} => {"name": name, "age": age}
print(name, age)

this is how it would work, it would do pattern matching just like match blocks to extract the name and age, its like

match {"name": "bob", "age": 5}:
  case {"name": name, "age": age}:
    print(name, age)

but is a bit hard to do

Has this already been discussed elsewhere?

No response given

Links to previous discussion of this feature:

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions