El lun, 13 dic 2021 a las 13:38, Erik De Bonte via Typing-sig (<typing-sig@python.org>) escribió:

I’ve created a draft PEP for the “Dataclass Transforms” concept that Eric Traut presented at the December 1st Typing SIG meetup. Feedback is welcome!

 

https://github.com/debonte/peps/blob/dataclass_transforms/pep-9999.rst

 


Hi Erik, I was discussing the PEP with Guido and we had some concerns around locking ourselves into an overly specific API. For example, type checkers may want to experiment with additional options to the dataclass_transform() decorator. If we decide to add more options in the future after the PEP is accepted, users would have to rely on updating typing-extensions quickly to use the new option.

Our idea is to make `@dataclass_transform()` accept and ignore arbitrary **kwargs at runtime. Type checkers would still give errors if users pass unrecognized parameters, but would be free to support additional experimental parameters without having to wait for changes to the runtime.
 

Thanks,

Erik

_______________________________________________
Typing-sig mailing list -- typing-sig@python.org
To unsubscribe send an email to typing-sig-leave@python.org
https://mail.python.org/mailman3/lists/typing-sig.python.org/
Member address: jelle.zijlstra@gmail.com