# Adding Deep Immutability

**URL:** <https://discuss.python.org/t/adding-deep-immutability/92011>\
**Category:** Ideas\
**Created:** [May 14, 2025, 9:27pm UTC](https://discuss.python.org/t/adding-deep-immutability/92011 "2025-05-14T21:27:34Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![stw](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/stw/32/27841_2.png) [@stw](https://discuss.python.org/u/stw)\
**Post date:** [May 15, 2025, 1:38am UTC](https://discuss.python.org/t/adding-deep-immutability/92011/3 "2025-05-15T01:38:17Z")

</div>

Yes, of course! There is a better and more comprehensive outline in the PEP linked in the post, but briefly:

1st PEP — Deep Immutability; objects can be made deeply immutable after which mutation attempts throw an exception. (This is the PEP linked in the post.)

2nd PEP: Add support for managing cyclic immutable garbage using a shared reference counter per strongly connected component of immutable objects plus adding support for atomic reference counting of immutable objects. This will permit immutable objects to be shared across threads and also across subinterpreters (by reference).

3rd PEP: Support for “sending” and “receiving” immutable objects between threads and subinterpreters + easy way to spawn parallel tasks that can run on subinterpreters and threads to facilitate opting in to parallelism.

4th PEP: Support for sharing mutable data between threads and subinterpreters using region-based ownership.

–Tobias

---

_[View the full topic](https://discuss.python.org/t/adding-deep-immutability/92011)._
