[Python-ideas] Re: dataclass field argument to allow converting value on init

2022-06-29 Thread Paul Bryan
I think we are saying the same thing. I don't think this would require another parameter if type checkers are capable of inferring the type from the parameter to the function to be called on init. On Wed, 2022-06-29 at 21:26 +, Steve Jorgensen wrote: > Paul Bryan wrote: > > Could the type

[Python-ideas] Re: dataclass field argument to allow converting value on init

2022-06-29 Thread Steve Jorgensen
Paul Bryan wrote: > Could the type hint for the __init__ parameter be inferred from the > (proposed) init_fn's own parameter type hint itself? > On Tue, 2022-06-28 at 16:39 +, Steve Jorgensen wrote: I think I was already suggesting that possibility "an optional argument to `InitFn` or maybe