Author Chris.Barker
Recipients Chris.Barker, docs@python, eric.smith, levkivskyi
Date 2017-12-19.02:41:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1513651277.65.0.213398074469.issue32216@psf.upfronthosting.co.za>
In-reply-to
Content
It was suggested that I could contirbute to the docs of dataclasses in this issue. Which confuses me, as there doesn't appear to be any content here to comment on. But what the heck:

As I've been annoyingly persistent about on the python-dev list, I think we need to be quite careful about making type hints appear to be a requirement for using dataclasses. In order to counter this, we could:

* have the first couple example be type-less:

@dataclass
class C:
    a: ...   # field without a default
    b: ... = 0 # field with a default

or something like that.

Then purposely introduce "how to add type hints" a bit down in the docs.
History
Date User Action Args
2017-12-19 02:41:17Chris.Barkersetrecipients: + Chris.Barker, eric.smith, docs@python, levkivskyi
2017-12-19 02:41:17Chris.Barkersetmessageid: <1513651277.65.0.213398074469.issue32216@psf.upfronthosting.co.za>
2017-12-19 02:41:17Chris.Barkerlinkissue32216 messages
2017-12-19 02:41:16Chris.Barkercreate