This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: dataclasses: it should be an error to specify KW_ONLY twice
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.10
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: eric.smith Nosy List: eric.smith
Priority: normal Keywords: patch

Created on 2021-05-03 06:09 by eric.smith, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 25841 merged eric.smith, 2021-05-03 07:05
Messages (2)
msg392768 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2021-05-03 06:09
Specifying KW_ONLY twice should raise an exception, but does not:

>>> @dataclasses.dataclass
... class foo:
...   _: dataclasses.KW_ONLY
...   x: dataclasses.KW_ONLY
msg392772 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2021-05-03 07:25
New changeset 99ad742ea913e421d012c1a623029eac31bdfe85 by Eric V. Smith in branch 'master':
bpo-44015: dataclasses should allow KW_ONLY to be specified only once per class (GH-25841)
Date User Action Args
2022-04-11 14:59:45adminsetgithub: 88181
2021-05-03 07:26:01eric.smithsetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2021-05-03 07:25:01eric.smithsetmessages: + msg392772
2021-05-03 07:05:26eric.smithsetkeywords: + patch
stage: patch review
pull_requests: + pull_request24525
2021-05-03 06:09:50eric.smithcreate