Ah right I see what you mean. In my example I avoided the use of `__init__` and specifically `__post_init__` as (and it's probably a fairly uncommon use case), in my actual project, `__post_init__` is defined on a base class, and inherited by all other classes, and I wanted to avoid overriding `__post_init__` (and super-ing). The idea was to have the conversion generated by the dataclass, within the `__init__` no function were required to be defined (similarly to how converters work in attrs).
With your suggestion, what do you think about having something similar to `InitVar` so it's more in line with how `__post_init__` currently works? For example, like one of my other suggestions, having a type called `InitFn` which takes two types: the type for `__init__` and the type of the actual field. _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/SCGSN3X5MXQXTVICU6VOIBM7UBVXJ457/ Code of Conduct: http://python.org/psf/codeofconduct/