Thanks!

El jue, 13 ene 2022 a las 10:22, Erik De Bonte (<Erik.DeBonte@microsoft.com>) escribió:

Thanks Jelle.

 

For the introspection issue, does this change properly describe what you suggested? Change runtime behavior to support introspection · debonte/peps@ccfa9c8 (github.com). I’m not sure if my description of the attribute value (“a serialized dict…”) is pythonic.

I'm not sure why it needs to be a serialized dict; it can just be a dict. 

 

Seems reasonable to call out the KW_ONLY sentinel value in the “Dataclass semantics” section, especially since it’s newish. Is there a PEP or GitHub issue that defines its behavior? I wasn’t able to find one.

https://bugs.python.org/issue43532 

 

-Erik

 

From: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Sent: Wednesday, January 12, 2022 10:52 AM
To: Erik De Bonte <Erik.DeBonte@microsoft.com>
Cc: typing-sig@python.org
Subject: Re: [Typing-sig] Dataclass Transform draft PEP

 

Thanks Erik! I have a few small pieces of feedback:

 

- The runtime implementation is currently an identity function. I'd prefer if it sets some flag on the decorated object, similar to what I'm proposing in https://github.com/python/cpython/pull/30530 for @final. I'd suggest setting `cls.__dataclass_transform__ = {"eq_default": True, ...}` on the decorated object.

- dataclasses now supports the KW_ONLY marker to make only some fields kw-only (https://docs.python.org/3/library/dataclasses.html#dataclasses.KW_ONLY). Should this be added to the spec?

 

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

 

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