The descriptor works just fine if there's only one attribute on the class that you want to make immutable, but since the name you use the same for all instances of the descriptor, they'll all save under the same name.
Also, for performance reasons, I would cache that name during construction in order to keep from needing to create a formatted string every time. :)
The descriptor works just fine if there's only one attribute on the class that you want to make immutable, but since the name you use the same for all instances of the descriptor, they'll all save under the same name.
Also, for performance reasons, I would cache that name during construction in order to keep from needing to create a formatted string every time. :)