Do you mind providing a little example of what you mean? I'm not sure I 100% 
understand what your use of `__post_init__` is. In my mind, it would be 
something like:
```py
@dataclass
class Foo:
    x: str = field(init=int, converter=chr)

# which converts to
class Foo:
    def __init__(self, x: int):
        self.x = chr(x)
```
without any use of `__post_init__`. If it were to be something like:
```py
class Foo:
    def __init__(self, x: int):
        self.__post_init__(x)

    def __post_init__(x: int):
        self.x = chr(x)
```
which, I think is what you are suggesting (please correct me if I'm wrong), 
then I feel that may be confusing if you were to override `__post_init__`, 
which is often much easier than overriding `__init__`.
For exmple, in a situation like:
```py
@dataclass
class Foo:
    x: str = field(init=int, converter=chr)
    y: InitVar[str]
```
if the user were to override `__post_init__`, would they know that they need to 
include `x` as the first argument? It's not typed with `InitVar` so it might 
not be clear that it's passed to `__post_init__`.
_______________________________________________
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/VHVOZYGIXIMZR66COBKCKQB7JP7LPPT3/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to