Author sigurd
Recipients eric.smith, sigurd
Date 2018-06-07.15:40:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I think you misunderstood the issue here. I'm not trying to replace the class variable itself, I'm changing another field on a class that has a class variable. The problem is that the replace method includes the class variable in the change dict when copying fields that are not included in the function call.

My call is: dataclasses.replace(obj, a=2) where I try to replace a, but it fails because class_var is included in the attributes to __init__ by the replace function.

The problem is on this line:
The _FIELDS attribute includes the class variable as a field, and it is therefore added to the changes dict.
Date User Action Args
2018-06-07 15:40:26sigurdsetrecipients: + sigurd, eric.smith
2018-06-07 15:40:26sigurdsetmessageid: <>
2018-06-07 15:40:26sigurdlinkissue33796 messages
2018-06-07 15:40:26sigurdcreate