
June 24, 2022
10:43 a.m.
On 2022-06-23 17:35:59, Steve Jorgensen wrote:
What if, instead, the `init` parameter could accept either a boolean (as it does now) or a type? When given a type, that would mean that to created the property and accept the argument but pass the argument ti `__post_init__` rather than using it to initialize the property directly. The type passed to `init` would become the type hint for the argument.
What if you wanted to create a boolean type from a function?