
April 1, 2022
4:37 p.m.
Hi Étienne, Thanks for clarifying. I completely misunderstood your question. Thanks for your feedback! This is an important point. We should be clear about where dataclass_transform can be applied for overloaded functions. I just created a PR which adds the following language to the PEP. https://github.com/python/peps/pull/2498 If the function has overloads, the ``dataclass_transform`` decorator can be applied to the implementation of the function or any one, but not more than one, of the overloads. The behavior is undefined if dataclass_transform is found in more than one of these locations. Type checkers can choose to report an error, use the first dataclass_transform decorator they find, etc. Thanks, Erik