[Python-Dev] Third and hopefully final post: PEP 557, Data Classes

Eric V. Smith eric at trueblade.com
Wed Nov 29 19:08:47 EST 2017

On 11/29/2017 6:51 PM, Carl Meyer wrote:
> On 11/29/2017 03:26 PM, Eric V. Smith wrote:
>> I've posted a new version of PEP 557, it should soon be available at
>> https://www.python.org/dev/peps/pep-0557/.
>> The only significant changes since the last version are:
>> - changing the "compare" parameter to be "order", since that more
>> accurately reflects what it does.
>> - Having the combination of "eq=False" and "order=True" raise an
>> exception instead of silently changing eq to True.
>> There were no other issues raised with the previous version of the PEP.
> Not quite; I also raised the issue of isdataclass(ADataClass) returning
> False. I still think that's likely to be a cause of bug reports if left
> as-is.

Oops, sorry about that!

I think you're probably right. attr.has(), which is the equivalent attrs 
API, returns True for both classes and instances (although 
interestingly, the code only talks about it working on classes).



More information about the Python-Dev mailing list