On Jun 23, 2023, at 9:34 AM, Joao S. O. Bueno <gwid...@gmail.com> wrote:
Dataclasses should provide a way to ignore a type hinted attributes, and not consider them as fields.
For example, some attributes might be derived during `__post_init__` from the values of the fields or other variables.
If one wants to still type hint these attributes, one has to awkward workarounds to avoid having dataclass interpret them as fields. (https://stackoverflow.com/questions/76532816)
But it’s not clear (to me) why not being a field is desirable. Why is it important?
Eric
_______________________________________________Python-ideas mailing list -- python-ideas@python.orgTo unsubscribe send an email to python-ideas-le...@python.orghttps://mail.python.org/mailman3/lists/python-ideas.python.org/Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/C5QJQT5YV7UOKFF57PWD4VSF4RWUDOSF/Code of Conduct: http://python.org/psf/codeofconduct/
|
_______________________________________________
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/AIBVZMIW7KYLY3T5Y3FNK2POVSNBIUTJ/
Code of Conduct: http://python.org/psf/codeofconduct/