Skip to content

bpo-33100: Dataclasses now handles __slots__ and default values correctly.#6152

Merged
ericvsmith merged 2 commits into
python:masterfrom
ericvsmith:bpo-33100-slots-and-defaults
Mar 20, 2018
Merged

bpo-33100: Dataclasses now handles __slots__ and default values correctly.#6152
ericvsmith merged 2 commits into
python:masterfrom
ericvsmith:bpo-33100-slots-and-defaults

Conversation

@ericvsmith

@ericvsmith ericvsmith commented Mar 20, 2018

Copy link
Copy Markdown
Member

If the class has a member that's a MemberDescriptorType, it's not a default value, it's from that member being in __slots__.

https://bugs.python.org/issue33100

@ericvsmith ericvsmith merged commit 7389fd9 into python:master Mar 20, 2018
@miss-islington

Copy link
Copy Markdown
Contributor

Thanks @ericvsmith for the PR 🌮🎉.. I'm working now to backport this PR to: 3.7.
🐍🍒⛏🤖

@ericvsmith ericvsmith deleted the bpo-33100-slots-and-defaults branch March 20, 2018 01:07
@bedevere-bot

Copy link
Copy Markdown

GH-6153 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Mar 20, 2018
…ctly. (pythonGH-6152)

If the class has a member that's a MemberDescriptorType, it's not a default value, it's from that member being in __slots__.
(cherry picked from commit 7389fd9)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
ericvsmith added a commit that referenced this pull request Mar 20, 2018
…ctly. (GH-6152) (GH-6153)

If the class has a member that's a MemberDescriptorType, it's not a default value, it's from that member being in __slots__.
(cherry picked from commit 7389fd9)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
jo2y pushed a commit to jo2y/cpython that referenced this pull request Mar 23, 2018
…ctly. (pythonGH-6152)

If the class has a member that's a MemberDescriptorType, it's not a default value, it's from that member being in __slots__.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants