[issue33474] Support immutability per-field in dataclasses

2018-05-14 Thread Daniel Lindeman
Daniel Lindeman <linde...@gmail.com> added the comment: A possible use case would be a field that represents an auto-incrementing database ID. Since the field is auto-incrementing in the database, it would be desirable to keep this field frozen, and others mutable once an instance of a

[issue33474] Support immutability per-field in dataclasses

2018-05-12 Thread Daniel Lindeman
New submission from Daniel Lindeman <linde...@gmail.com>: 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 dec