msg307614 - (view) |
Author: Eric V. Smith (eric.smith) *  |
Date: 2017-12-05 02:05 |
The documentation needs to be added. |
|
|
msg308608 - (view) |
Author: Christopher Barker (Chris.Barker) |
Date: 2017-12-19 02:41 |
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. |
|
|
msg308920 - (view) |
Author: STINNER Victor (vstinner) *  |
Date: 2017-12-21 23:48 |
My Issue32406 has been marked as a duplicate of this one. Copy of my message: bpo-32214 "Implement PEP 557: Data Classes" added a new dataclasses module and was closed, but the new module is not documented: https://docs.python.org/dev/library/dataclasses.html And it's also missing from What's New in Python 3.7: https://docs.python.org/dev/whatsnew/3.7.html |
|
|
msg311496 - (view) |
Author: Barry A. Warsaw (barry) *  |
Date: 2018-02-02 15:14 |
Do you have an ETA for the documentation PR? I would be happy to review it. |
|
|
msg311498 - (view) |
Author: Eric V. Smith (eric.smith) *  |
Date: 2018-02-02 15:24 |
I was hoping a volunteer would step up to write the documentation, as it's definitely not my forte. Raymond has also volunteered to help. |
|
|
msg311499 - (view) |
Author: Ned Deily (ned.deily) *  |
Date: 2018-02-02 15:50 |
Marking this as a "deferred blocker" for exiting the beta phase. |
|
|
msg311531 - (view) |
Author: Mariatta (Mariatta) *  |
Date: 2018-02-03 03:23 |
I'd be interested to help write the PR for this. |
|
|
msg311576 - (view) |
Author: Raymond Hettinger (rhettinger) *  |
Date: 2018-02-03 23:32 |
> I'd be interested to help write the PR for this. I've already started on drafting these docs. Would you like to work together? |
|
|
msg311583 - (view) |
Author: Christopher Barker (Chris.Barker) |
Date: 2018-02-04 03:25 |
Thanks Raymond. Can a draft be put in a gitHub repo so we can all help out? |
|
|
msg311584 - (view) |
Author: Mariatta (Mariatta) *  |
Date: 2018-02-04 03:36 |
> I've already started on drafting these docs. Would you like to work together? Sure, Raymond. Let me know how I can help :) |
|
|
msg314823 - (view) |
Author: Lino Mastrodomenico (mastrodomenico) |
Date: 2018-04-02 19:25 |
Friendly ping, there's still no documentation for this wonderful new module and there's only one planned beta left for 3.7 before the release candidates. Needless to say, https://www.python.org/dev/peps/pep-0557/ has lots of information that could be a starting point. |
|
|
msg316360 - (view) |
Author: Ned Deily (ned.deily) *  |
Date: 2018-05-10 12:35 |
We really need to get this done prior to 370rc1 coming up on 05-21. |
|
|
msg316545 - (view) |
Author: Eric V. Smith (eric.smith) *  |
Date: 2018-05-14 18:07 |
Note that the documentation should make the implications of #33453 very clear. In short, if an annotation "looks like" a ClassVar or InitVar, it will be treated as such. This is true even if it's specified as a string, or if it's a string due to "from __future__ import annotations". I'm planning on specifying more details in #33453. |
|
|
msg316634 - (view) |
Author: Raymond Hettinger (rhettinger) *  |
Date: 2018-05-15 10:23 |
Mariatta, go ahead and take the lead on this one. |
|
|
msg316783 - (view) |
Author: Eric V. Smith (eric.smith) *  |
Date: 2018-05-16 08:20 |
New changeset 98d50cb8f57eb227c373cb94b8680b12ec8aade5 by Eric V. Smith in branch 'master': bpo-32216: Add documentation for dataclasses (GH-6886) https://github.com/python/cpython/commit/98d50cb8f57eb227c373cb94b8680b12ec8aade5 |
|
|
msg316790 - (view) |
Author: miss-islington (miss-islington) |
Date: 2018-05-16 09:17 |
New changeset 04e96da5e4982afeb639d6a4d232c6c221fe3a9d by Miss Islington (bot) in branch '3.7': bpo-32216: Add documentation for dataclasses (GH-6886) https://github.com/python/cpython/commit/04e96da5e4982afeb639d6a4d232c6c221fe3a9d |
|
|
msg316793 - (view) |
Author: Eric V. Smith (eric.smith) *  |
Date: 2018-05-16 09:21 |
I've added some initial documentation. Most of it is text from the PEP, cleaned up and sphinx-ized. It no doubt needs a lot of work, but I think it's good enough to close this issue and remove the release blocker. Changes to the documentation can be done going forward, including after 3.7.0rc1 is released. |
|
|
msg316839 - (view) |
Author: Barry A. Warsaw (barry) *  |
Date: 2018-05-16 16:44 |
I've got a branch that cleans up and updates the dataclasses documentation, so I'm reopening this issue and piggybacking my PR on it. |
|
|
msg316840 - (view) |
Author: Barry A. Warsaw (barry) *  |
Date: 2018-05-16 16:44 |
...although I unfortunately cannot build it because of Issue33543 |
|
|
msg316854 - (view) |
Author: Barry A. Warsaw (barry) *  |
Date: 2018-05-16 19:50 |
New changeset 713a9367366c88662c39ed20dd6bce22399299f1 by Barry Warsaw in branch 'master': bpo-32216: Update dataclasses documentation (#6913) https://github.com/python/cpython/commit/713a9367366c88662c39ed20dd6bce22399299f1 |
|
|
msg316862 - (view) |
Author: Barry A. Warsaw (barry) *  |
Date: 2018-05-16 20:37 |
New changeset 0c62e09774e445a185fd192524454ce697ca123b by Barry Warsaw (Miss Islington (bot)) in branch '3.7': bpo-32216: Update dataclasses documentation (GH-6913) (#6918) https://github.com/python/cpython/commit/0c62e09774e445a185fd192524454ce697ca123b |
|
|