https://pantsbuild.org/ logo
b

bitter-ability-32190

01/24/2023, 4:12 PM
Oh TIL: Non-frozen non-dataclass subclasses of a frozen dataclass superclass are unfrozen: https://github.com/python/cpython/pull/6148
c

curved-television-6568

01/24/2023, 5:27 PM
I think you read that wrong. Only non-dataclass subclasses of a frozen dataclass are unfrozen. If the subclass is a dataclass it must match the super class’s frozeness--is how I read it at least… 🙂
b

bitter-ability-32190

01/24/2023, 7:28 PM
Oops that's just a typo
I learned this from Field subclasses
c

curved-television-6568

01/24/2023, 8:17 PM
?
b

bitter-ability-32190

01/24/2023, 8:21 PM
In my PR I'm making it a frozen dataclass, but the derived vanilla class isn't frozen
6 Views