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.

Author eric.smith
Recipients eric.smith, stachel
Date 2018-03-19.11:32:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1521459151.79.0.467229070634.issue33100@psf.upfronthosting.co.za>
In-reply-to
Content
My point is that the problem is that after:

@dataclass
class Base:
    __slots__ = ('x',)
    x: Any

Base.x has a value (it's the member_descriptor for x). That's what's causing the problem that when adding a field to the derived class, it thinks you're adding a field without a default value after one that has a default value.

I agree that I could detect this specific case and allow it. My comment about the error message was inaccurate.
History
Date User Action Args
2018-03-19 11:32:31eric.smithsetrecipients: + eric.smith, stachel
2018-03-19 11:32:31eric.smithsetmessageid: <1521459151.79.0.467229070634.issue33100@psf.upfronthosting.co.za>
2018-03-19 11:32:31eric.smithlinkissue33100 messages
2018-03-19 11:32:31eric.smithcreate