evhub / evhub/coconut

Match rest keyword arguments of a data class

Open
#899 2 comments 0 reactions 0 assignees View on GitHub
feature
Dominant language
Python
Stars
4.4k
Forks
142
PR merge metrics
No merged PRs in 30d

Description

Isn't it possible to match the rest of data class keyword arguments similar to a dictionary?

The code below throws a parse error:
```
data T(a: int, b: int)
t = T(1, 2)

match T(a=arg1, **_) in t: print(arg1)
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.