Commit 663eec0
Complete Phase 5C: C3 MRO, __new__, attr hooks, class decorators, __slots__, @DataClass
- C3 MRO linearization replacing simple dedup-flattening for correct
diamond inheritance resolution
- __new__ method support with object.__new__(cls) for custom allocation
- __getattr__ fallback when normal attribute lookup fails
- __setattr__/__delattr__ hooks with object.__setattr__/object.__delattr__
for direct access bypassing hooks
- __annotations__ dict captured during class body execution
- __dict__, __class__, __name__, __mro__ special attributes on instances/classes
- Class decorator application (@decorator on class definitions)
- __slots__ support restricting instance attributes to declared names
- @DataClass decorator auto-generating __init__, __repr__, __eq__ with
frozen=True, slots=True, and default value support
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 8e8e121 commit 663eec0
4 files changed
Lines changed: 501 additions & 37 deletions
0 commit comments