Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store kwargs in store_attr #262

Closed
hamelsmu opened this issue Dec 20, 2020 · 0 comments
Closed

Store kwargs in store_attr #262

hamelsmu opened this issue Dec 20, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@hamelsmu
Copy link
Member

Would be cool if this worked

class T:
    def __init__(self, a,b,c,**kwargs): store_attr(**kwargs)

t = T(1,c=2,b=3,d=4,e=-1)
assert t.a==1 and t.b==3 and t.c==2 and t.d==4 and t.e==-1
@hamelsmu hamelsmu added the enhancement New feature or request label Dec 20, 2020
@jph00 jph00 closed this as completed in 29b0fd4 Dec 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant