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 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.

----------
messages: 316438
nosy: Daniel Lindeman, eric.smith
priority: normal
severity: normal
status: open
title: Support immutability per-field in dataclasses
type: enhancement
versions: Python 3.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue33474>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to