RFC on PEP 681: Data Class Transforms

PEP 681 improves type checker support for libraries with dataclass-like behaviors by introducing a way to map the behaviors of decorators and classes in those libraries to the behaviors of stdlib dataclass.

The PEP will not affect CPython directly except for the addition of the dataclass_transform decorator in typing.py. The decorator is currently in typing_extensions.

The canonical discussion thread is on Typing SIG.

Any feedback would be appreciated!

Thanks,
Erik

1 Like

To avoid bifurcating the discussion, as so often happens, maybe @admins or @moderators could lock this thread?

1 Like

Sending a message to typing-sig forum will apparently subscribe me to the mailing list. If I reply there, am I expected to stay subscribed and watch the list?

This seems a Mailman peculiarity (you can’t subscribe to just one discussion). I guess if you’re interested in the discussion you should stay subscribed while it is going on – you won’t be receiving courtesy CCs when people respond to the thread. Although in theory you could just poll the Mailman page occasionally, that feels awkward. Fortunately typing-sig is not that busy.

1 Like