curved-television-6568
07/21/2021, 5:50 AMfrozen_after_init
.
In https://www.pantsbuild.org/docs/style-guide#prefer-dataclasses there’s described how to mutate input parameters during init, but no mention of InitVar
?
https://docs.python.org/3/library/dataclasses.html?highlight=initvar#init-only-variables
Uhm.. reading up on it again, is it to circumvent the limitation described in there regarding frozen instances.. ?
There is a tiny performance penalty when using `frozen=True`:cannot use simple assignment to initialize fields, and must use__init__()
.object.__setattr__()
hundreds-father-404
07/21/2021, 6:34 AMcurved-television-6568
07/21/2021, 11:12 AM