Christopher Barker <chris.bar...@noaa.gov> added the comment:

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.

----------
nosy: +Chris.Barker

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32216>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to