8000 Match dicts with extra keys · Issue #267 · evhub/coconut · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Match dicts with extra keys #267
Closed
Closed
@cgarciae

Description

@cgarciae

dicts that have all the requiered keys should match, even if they have more keys. Currently the following code gets a MatchError:

def test({"a": a} as d):
    print(a, d)

dict(a = 2, b = 3) |> test

This behaviour is found in Elixir and Elm, and I think it would be nice to have it in Coconut.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0