Message 316438 - Python tracker

Message316438

Author Daniel Lindeman
Recipients Daniel Lindeman, eric.smith
Date 2018-05-12.21:28:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1526160537.62.0.682650639539.issue33474@psf.upfronthosting.co.za>
In-reply-to
Content
Currently, all fields in dataclasses can be frozen by passing frozen=True to the decorator. There are cases where it would be useful to have some fields be mutable, and others immutable. By using a strategy similar to how the decorator frozen works, using __setattr__ and __delattr__, it would be possible to support immutability per-field. This could perhaps be done by adding a frozen argument to the field constructor.
History
Date User Action Args
2018-05-12 21:28:57Daniel Lindemansetrecipients: + Daniel Lindeman, eric.smith
2018-05-12 21:28:57Daniel Lindemansetmessageid: <1526160537.62.0.682650639539.issue33474@psf.upfronthosting.co.za>
2018-05-12 21:28:57Daniel Lindemanlinkissue33474 messages
2018-05-12 21:28:57Daniel Lindemancreate