How can a subclass control what data is stored in an immutable instance?
PythonLevel: Advanced
How can a subclass control what data is stored in an immutable instance?
Hints
- Identify object types, mutability and execution order.
- Trace a minimal example: which values and references change?
Answer
This answer is part of mentoring
Advanced questions come with a full breakdown and a mock interview with a working quant researcher. The first call is free.
Source and licence: Python 3.14.0 Programming FAQ — Python Software Foundation · PSF-2.0