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

Is there not an __post__init or some way to initialize a member based on the values of other members? #189

Open
metaperl opened this issue Jan 27, 2023 · 1 comment

Comments

@metaperl
Copy link

The default value example shows numerous ways to initialize a member. But what if you want to initialize it based on the other values of the object being instantiated?

Does Atom have something like dataclass' __post__init()?

@MatthieuDartiailh
Copy link
Member

There is nothing like a post_init no, however using a custom _default_* method you can look up the value of other members when building the default value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants